6.1.0
You can now sponsor Slevomat Coding Standard development
New sniffs
RequireNullCoalesceEqualOperatorSniff: Requires use of null coalesce equal operator when possibleRequireMultiLineMethodSignatureSniff: Enforces method signature to be splitted to more lines so each parameter is on its own lineRequireSingleLineMethodSignatureSniff: Enforces method signature to be on a single line (thanks to @grongor)PropertySpacingSniff: Checks that there is a certain number of blank lines between properties (thanks to @grongor)ConstantSpacingSniff: Checks that there is a certain number of blank lines between constants (thanks to @grongor)ParentCallSpacingSniff: Enforces configurable number of lines around parent method call (thanks to @grongor)ClassStructureSniff: Checks that class/trait/interface members are in the correct order (thanks to @grongor)RequireOneLineDocCommentSniff: Requires comments with single-line content to be written as one-liners (thanks to @grongor)MultiLineArrayEndBracketPlacementSniff: Enforces reasonable end bracket placement for multiline arrays (thanks to @grongor)SingleLineArrayWhitespaceSniff: Checks whitespace in single line array declarations (thanks to @grongor)NegationOperatorSpacingSniff: Checks if there is the same number of spaces after negation operator as expected (thanks to @grongor)LineLengthSniff: Enforces maximum length of a single line of code (thanks to @grongor)DisallowEmptyFunctionSniff: Reports empty functions body and require at least a comment inside (thanks to @arxeiss)
Improvements
UnusedPrivateElementsSniff: New optionalwaysUsedMethodsAnnotations(thanks to @simPod)- Don't break the complete PHPCS run for unsupported syntaxes (thanks to @jrfnl)
Fixes
FullyQualifiedGlobalConstantsSniff: Fixed false positivesFullyQualifiedGlobalFunctionsSniff: Fixed false positivesUnusedVariableSniff: Fixed false positiveUselessVariableSniff: Fixed false positivesRequireTernaryOperatorSniff: Fixed false positives (thanks to @grongor)JumpStatementsSpacingSniff: Fixed false positives (thanks to @grongor)NullableTypeForNullDefaultValueSniff: Workaround for bug in PHPCS