Releases
1.4.5
Added Generic LowerCaseKeywordSniff to ensure all PHP keywords are defined in lowercase
The PSR2 and Squiz standards now use this sniff
Added Generic SAPIUsageSniff to ensure the PHP_SAPI constant is used instead of php_sapi_name() (request #19863 )
Squiz FunctionSpacingSniff now has a setting to specify how many lines there should between functions (request #19843 )
Default remains at 2
Override the "spacing" setting in a ruleset.xml file to change
Squiz LowercasePHPFunctionSniff no longer throws errors for the limited set of PHP keywords it was checking
Add a rule for Generic.PHP.LowerCaseKeyword to your ruleset to replicate this functionality
Added support for the PHP 5.4 T_CALLABLE token so it can be used in lower PHP versions
Generic EndFileNoNewlineSniff now supports checking of CSS and JS files
PSR2 SwitchDeclarationSniff now has a setting to specify how many spaces code should be indented
Default remains at 4; override the indent setting in a ruleset.xml file to change
Thanks to Asher Snyder for the patch
Generic ScopeIndentSniff now has a setting to specify a list of tokens that should be ignored
The first token on the line is checked and the whole line is ignored if the token is in the array
Thanks to Eloy Lafuente for the patch
Squiz LowercaseClassKeywordsSniff now checks for the TRAIT keyword
Thanks to Anthon Pang for the patch
If you create your own PHP_CodeSniffer object, PHPCS will no longer exit when an unknown argument is found
This allows you to create wrapper scripts for PHPCS more easily
PSR2 MethodDeclarationSniff no longer generates a notice for methods named "_"
Thanks to Bart S for the patch
Squiz BlockCommentSniff no longer reports that a blank line between a scope closer and block comment is invalid
Generic DuplicateClassNameSniff no longer reports an invalid error if multiple PHP open tags exist in a file
Generic DuplicateClassNameSniff no longer reports duplicate errors if multiple PHP open tags exist in a file
Fixed bug #19819 : Freeze with syntax error in use statement
Fixed bug #19820 : Wrong message level in Generic_Sniffs_CodeAnalysis_EmptyStatementSniff
Fixed bug #19859 : CodeSniffer::setIgnorePatterns API changed
Fixed bug #19871 : findExtendedClassName doesn't return FQCN on namespaced classes
Fixed bug #19879 : bitwise and operator interpreted as reference by value
You can’t perform that action at this time.