Skip to content

6.1.0

Compare
Choose a tag to compare
@kukulich kukulich released this 20 Jan 08:59
· 1010 commits to master since this release
6.1.0
2f5e010

You can now sponsor Slevomat Coding Standard development

New sniffs

  • RequireNullCoalesceEqualOperatorSniff: Requires use of null coalesce equal operator when possible
  • RequireMultiLineMethodSignatureSniff: Enforces method signature to be splitted to more lines so each parameter is on its own line
  • RequireSingleLineMethodSignatureSniff: 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 option alwaysUsedMethodsAnnotations (thanks to @simPod)
  • Don't break the complete PHPCS run for unsupported syntaxes (thanks to @jrfnl)

Fixes

  • FullyQualifiedGlobalConstantsSniff: Fixed false positives
  • FullyQualifiedGlobalFunctionsSniff: Fixed false positives
  • UnusedVariableSniff: Fixed false positive
  • UselessVariableSniff: Fixed false positives
  • RequireTernaryOperatorSniff: Fixed false positives (thanks to @grongor)
  • JumpStatementsSpacingSniff: Fixed false positives (thanks to @grongor)
  • NullableTypeForNullDefaultValueSniff: Workaround for bug in PHPCS