C.71 PhpCSTask

This task runs PHP_CodeSniffer Version 3+ to detect violations of a defined set of coding standards.

Table C.93: Attributes

NameTypeDescriptionDefaultRequired
fileStringFile or directory to check.n/aYes
binStringPath to phpcs binary.phpcsNo
cacheBooleanCache results between runs.falseNo
ignoreAnnotationsBooleanIgnore all phpcs annotations in code comments.falseNo
checkreturnBooleanWhether to check the return code.falseNo
levelStringSet the log level of generated messages. Change this to verbose, if you only want output in verbose mode for example. Valid log levels are one of debug, info, verbose, warning or errorinfoNo

C.71.1 Examples

<phpcs bin="bin/phpcs" file="classes" checkreturn="true"/>