C.70 PhpCSTask

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

Table C.89: 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.70.1 Supported Nested Tags

  • FileSet

C.70.2 Examples

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