C.61 PhpCSTask

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

Table C.74: Attributes

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.61.1 Supported Nested Tags

  • FileSet

C.61.2 Examples

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