Skip to content

Releases: slevomat/coding-standard

6.1.2

01 Feb 16:12
6.1.2
bb9db1a

Choose a tag to compare

You can now sponsor Slevomat Coding Standard development

Fixes

  • SingleLineArrayWhitespaceSniff: Fixed settings by XML configuration (thanks to @mcaskill)
  • UselessParenthesesSniff: Fixed false positive
  • ParentCallSpacingSniff: Fixed false positive
  • PropertySpacingSniff: Fixed settings by XML configuration (thanks to @paxal)
  • ConstantSpacingSniff: Fixed settings by XML configuration (thanks to @paxal)
  • PropertySpacingSniff: Fixed false positive
  • ConstantSpacingSniff: Fixed false positive
  • UnusedPrivateElementsSniff: Fixed support for private typed properties (thanks to @paxal)
  • ParameterTypeHintSniff: Fixed support for union and nullable types
  • ReturnTypeHintSniff: Fixed support for union and nullable types
  • PropertyTypeHintSniff: Fixed support for union and nullable types

Improvements

  • SingleLineArrayWhitespaceSniff: Add empty array support (can be enabled with new option enableEmptyArrayCheck) (thanks to @mcaskill)
  • TraitUseSpacingSniff: Added additional setting linesCountBeforeFirstUseWhenFirstInClass (thanks to @thled)
  • RequireSingleLineMethodSignatureSniff: New option includedMethodPatterns (thanks to @RiKap)
  • RequireSingleLineMethodSignatureSniff: New option excludedMethodPatterns (thanks to @RiKap)
  • RequireMultiLineMethodSignatureSniff: New option includedMethodPatterns (thanks to @RiKap)
  • RequireMultiLineMethodSignatureSniff: New option excludedMethodPatterns (thanks to @RiKap)

6.1.1

23 Jan 16:34
6.1.1
0a7934d

Choose a tag to compare

You can now sponsor Slevomat Coding Standard development

Fixes

  • ParentCallSpacingSniff: Fixed false positive (thanks to @grongor)
  • RequireSingleLineMethodSignatureSniff: Fix for semicolons (thanks to @grongor)
  • PropertyTypeHintSniff: Improved support for union types
  • ReturnTypeHintSniff: Improved support for union types
  • ParameterTypeHintSniff: Improved support for union types
  • ClassStructureSniff: Fix missing support for static abstract methods (thanks to @grongor)

Improvements

  • NullableTypeForNullDefaultValueSniff: Allow suppress (thanks to @simPod)

6.1.0

20 Jan 08:59
6.1.0
2f5e010

Choose a tag to compare

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

6.0.8

14 Jan 08:52
6.0.8
dd399a5

Choose a tag to compare

Fixes

  • ReferenceUsedNamesOnlySniff: Fixed missing reports
  • ReferenceUsedNamesOnlySniff: Fixed false positive

6.0.7

12 Jan 20:33
6.0.7
2731353

Choose a tag to compare

Fixes

  • InlineDocCommentDeclarationSniff: Fixed false positives

6.0.6

09 Jan 19:56
6.0.6
3cc9f2f

Choose a tag to compare

Fixes

  • StaticClosureSniff: Fixed false positive
  • UselessParenthesesSniff: Fixed false positive
  • JumpStatementsSpacingSniff: Fix yield inside function calls
  • DocCommentSpacingSniff: Fixed support for @phpstan and @phpcs annotations

6.0.5

19 Dec 16:17
6.0.5
eaa0c35

Choose a tag to compare

Fixes

  • EarlyExitSniff: Fixed internal error

Improvements

  • Support of phpstan/phpdoc-parser 0.4.2 (thanks to @jeroennoten)

6.0.4

17 Dec 20:08
6.0.4
34ec0a4

Choose a tag to compare

Fixes

  • Fixed bugs caused by broken DocCommentHelper

6.0.3

16 Dec 12:01
6.0.3

Choose a tag to compare

Fixes

  • UselessParenthesesSniff: Fixed false positive
  • EarlyExitSniff: Improved internal errors reporting

6.0.2

11 Dec 13:50
6.0.2
beea16e

Choose a tag to compare

Fixes

  • UselessParenthesesSniff: Fixed false positive