github slevomat/coding-standard 6.4.0

latest releases: 8.15.0, 8.14.1, 8.14.0...
3 years ago

📣 You can now sponsor Slevomat Coding Standard development

🆕 New sniffs

  • RequireSingleLineConditionSniff: Enforces conditions of if, elseif, while and do-while to be on a single line
  • RequireMultiLineConditionSniff: Enforces conditions of if, elseif, while and do-while with one or more boolean operators to be splitted to more lines so each condition part is on its own line
  • RequireSingleLineCallSniff: Enforces function call to be on a single line
  • RequireMultiLineCallSniff: Enforces function call to be splitted to more lines so each parameter is on its own line
  • DeprecatedAnnotationDeclarationSniff: Reports @deprecated annotations without description (thanks to @gmponos)
  • SuperfluousErrorNamingSniff: Reports use of superfluous suffix Error for errors (thanks to @gmponos)

🔧 Improvements

  • All sniffs should work on PHP 8 if you don't use new syntax - new syntax has to be supported by PHPCS first
  • Support for class-string type hint
  • DuplicateSpacesSniff: New option ignoreSpacesInParameters
  • InlineDocCommentDeclarationSniff: New option allowAboveNonAssignment
  • ReferenceUsedNamesOnlySniff: Less colisions with AlphabeticallySortedUsesSniff

🐛 Fixes

  • LanguageConstructWithParenthesesSniff: Some errors were not reported

⚠️Deprecated

  • UnusedPrivateElementsSniff: Mark as deprecated

Don't miss a new coding-standard release

NewReleases is sending notifications on new releases.