Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
6.3.5
📣 You can now sponsor Slevomat Coding Standard development
Fixes
EarlyExitSniff:yielddoes not do early exitEarlyExitSniff: Fixed false positiveBlockControlStructureSpacingSniff: Fixed false positivesJumpStatementsSpacingSniff: Improved fixerRequireTernaryOperatorSniff: Fixer should not remove comments
6.3.4
📣 You can now sponsor Slevomat Coding Standard development
Fixes
EarlyExitSniff: Fixed internal errorBlockControlStructureSpacingSniff: Fixed false positiveUselessFunctionDocCommentSniff: Fixed internal error- Fixed parsing really strange WordPress documentation
TypeNameMatchesFileNameSniff: Exclude provided base path (thanks to @rmikalkenas)
6.3.3
📣 You can now sponsor Slevomat Coding Standard development
Improvements
ClassMemberSpacingSniff: Improved for invalid commentsUselessVariableSniff: Improved fixer
Fixes
StrictCallSniff: Fixed false positive
6.3.2
6.3.1
📣 You can now sponsor Slevomat Coding Standard development
Fixes
ClassStructureSniff: Fixed internal errorClassMemberSpacingSniff: Fixed false positiveStaticClosureSniff: Workaround for bug in PHPCS
6.3.0
📣 You can now sponsor Slevomat Coding Standard development
New sniffs
ClassMemberSpacingSniff: Checks lines count between different class members, eg. between last property and first methodStrictCallSniff: Some functions have$strictparameter. This sniff reports calls to these functions without the parameter or with$strict = falseForbiddenClassesSniff: Reports usage of forbidden classes, interfaces, parent classes and traits (thanks to @arxeiss)
Improvements
- Support for parsing and checking
@templateetc annotations - Support for more prefixed annotations (
@psalm-or@phpstan-prefixes) EarlyExitSniff: New optionignoreTrailingIfWithOneInstructionAssignmentInConditionSniff: New optionignoreAssignmentsInsideFunctionCalls(thanks to @nightlinus)DuplicateSpacesSniff: New optionignoreSpacesInCommentLineLengthSniff: Speedup (thanks to @nightlinus)
Fixes
FullyQualifiedClassNameInAnnotationSniff: Does not report@templateParentCallSpacingSniff: Fixed false positiveReturnTypeHintSniff: Fixed false positiveParameterTypeHintSniff: Fixed false positivePropertyTypeHintSniff: Fixed false positiveMethodSpacingSniff: Fixed false positiveEarlyExitSniff: Fixed missing reportConstantSpacingSniff: Fixed internal error
6.2.0
📣 You can now sponsor Slevomat Coding Standard development
New sniffs
ArrowFunctionDeclaration: ChecksfndeclarationMethodSpacingSniff: Checks that there is a certain number of blank lines between methodsDisallowMultiConstantDefinitionSniff: Disallows multi constant definitionDisallowMultiPropertyDefinitionSniff: Disallows multi property definitionDisallowDirectMagicInvokeCallSniff: Disallows direct call of__invoke()DisallowSuperGlobalVariableSniff: Disallows use of super global variablesDisallowInlineCommentAfterCodeSniff: Disallows comments after code at the same lineDuplicateSpacesSniff: Checks duplicate spaces anywhere
Improvements
InlineDocCommentDeclarationSniff: New optionallowDocCommentAboveReturnEarlyExitSniff: New optionignoreOneLineTrailingIfFullyQualifiedGlobalConstantsSniff: New optioninclude(thanks to @bbatsche)FullyQualifiedGlobalFunctionsSniff: New optioninclude(thanks to @bbatsche)FullyQualifiedGlobalFunctionsSniff: New optionincludeSpecialFunctionsRequireYodaComparisonSniff: New optionalwaysVariableOnRightJumpStatementsSpacingSniff: New optionslinesCountBeforeWhenFirstInCaseOrDefault,linesCountAfterWhenLastInCaseOrDefaultandlinesCountAfterWhenLastInLastCaseOrDefaultClassStructureSniff: New optionenableFinalMethodsto support final methods groupsRequireNullCoalesceEqualOperatorSniff: New optionenable(thanks to @carusogabriel)TrailingCommaInCallSniff: New optionenable(thanks to @carusogabriel)RequireArrowFunctionSniff: New optionenable(thanks to @carusogabriel)RequireNumericLiteralSeparatorSniff: New optionenable(thanks to @carusogabriel)RequireNumericLiteralSeparatorSniff: New optionminDigitsBeforeDecimalPointRequireNumericLiteralSeparatorSniff: New optionminDigitsAfterDecimalPointClassStructureSniff: Support for shortcut groupsReferenceThrowableOnlySniff: Can be suppressed when\Exceptionis used as parameterParameterTypeHintSniff:@psalm-paramand@phpstan-paramare sufficient as type hintsReturnTypeHintSniff:@psalm-returnand@phpstan-returnare sufficient as type hintsPropertyTypeHintSniff:@psalm-varand@phpstan-varare sufficient as type hintsRequireNullCoalesceOperatorSniff: Improved fixerPropertyTypeHintSniff: Improved performancePropertyTypeHintSpacingSniff: Improved performanceUnusedUsesSniff: Improved performance (thanks to @nightlinus)UnusedVariableSniff: Improved performance (thanks to @nightlinus)FullyQualifiedExceptionsSniff: Improved performanceReferenceUsedNamesOnlySniff: Improved performanceFullyQualifiedGlobalConstantsSniff: Improved performanceFullyQualifiedGlobalFunctionsSniff: Improved performance- Support for PHPCS configuration
php_versionin all possible sniffs NamespaceHelper: Improved performance (thanks to @nightlinus)
Fixes
PropertySpacingSniff: Fixed false positiveJumpStatementsSpacingSniff: Fixed false positiveUselessParenthesesSniff: Fixed false positiveUnusedVariableSniff: Fixed false positivesEarlyExitSniff: Fixed false positivesInlineDocCommentDeclarationSniff: Fixed false positivesBlockControlStructureSpacingSniff: Fixed false positiveNegationOperatorSpacingSniff: Fixed internal errorReturnTypeHintSniff: Fixed breaking syntax on removing useless@returnannotation in one-line doccomment (thanks to @nightlinus)ParameterTypeHintSniff: Fixed breaking syntax on removing useless@paramannotation in one-line doccommentForbiddenAnnotationsSniff: Fixed fixer for one-line doccommentsInlineDocCommentDeclarationSniff: Added support for various spacings in callable typehint (thanks to @simPod)PropertySpacingSniff: Fixed fixerUnusedUsesSniff: Fix for duplicate errorsAlphabeticallySortedUsesSniff: Fix for duplicate errorsReferenceThrowableOnlySniff: Fix for duplicate errorsFullyQualifiedGlobalConstantsSniff: Fix for duplicate errorsFullyQualifiedGlobalFunctionsSniff: Fix for duplicate errorsFullyQualifiedExceptionsSniff: Fix for duplicate errorsReferenceUsedNamesOnlySniff: Fix for duplicate errorsUselessAliasSniff: Fix for duplicate errorsUseSpacingSniff: Fix for duplicate errorsUseStatementHelper: Workaround for bug in PHPCS
6.1.5
6.1.4
You can now sponsor Slevomat Coding Standard development
Fixes
PropertySpacingSniff: Fixed support for typed propertiesParameterTypeHintSniff: Fixed false positivesPropertyTypeHintSniff: Fixed false positivesReturnTypeHintSniff: Fixed false positivesEarlyExitSniff: Fixed fixer for heredoc/nowdoc
6.1.3
You can now sponsor Slevomat Coding Standard development
Fixes
ParameterTypeHintSniff: Fixed false positivesReturnTypeHintSniff: Fixed false positivesPropertyTypeHintSniff: Fixed false positives