Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
4.6.2
4.6.1
Compatibility with PHPCS 3.3
Fixes:
ReferenceUsedNamesOnlySniff: Fixed fixer for classes in doccommentsDisallowEqualOperatorsSniff: Fixed message when operator is<>(thanks to @carusogabriel)
4.6.0
New sniffs:
NamespaceDeclarationSniff: Enforces one space afternamespace, disallows content between namespace name and semicolon and disallows use of bracketed syntaxNamespaceSpacingSniff: Enforces configurable number of lines before and afternamespaceRequireOneNamespaceInFileSniff: Requires only one namespace in a fileDisallowIncrementAndDecrementOperatorsSniff: Disallows using++and--operatorsRequireShortTernaryOperatorSniff: Requires short ternary operator?:when possibleDisallowShortTernaryOperatorSniff: Disallows short ternary operator?:DisallowEmptySniff: Disallows use ofempty()ShortListSniff: Enforces using short form of list syntax,[...]instead oflist(...)(thanks to @Majkl578)
Improvements:
InlineDocCommentDeclarationSniff: Reports empty@varannotationsInlineDocCommentDeclarationSniff: Reports invalid comment type used for inline documentation commentInlineDocCommentDeclarationSniff: Reports doccomment above foreach and while as wellUseSpacingSniff: Enforce zero number of lines between same types of use statementUnusedUsesSniff:ignoredAnnotations- Case sensitive list of annotation names that the sniff ignore completely (both name and content are ignored)TypeHintDeclarationSniff:allAnnotationsAreUseful- Doccomment is useful if it contain any annotation, optionusefulAnnotationsis deprecatedUnusedPrivateElementsSniff:alwaysUsedPropertiesAnnotationssupports prefixesUnusedUsesSniff: Improved@methodannotation parsing
Fixes:
EarlyExitSniff: Fixed noticesEarlyExitSniff: Fixed fixer for complicated logical conditionsUnusedUsesSniff: Fixed false positivesUnusedPrivateElementsSniff: Fixed false positive when property used innewReferencedNameHelper:gotolabel should not be resolved as constantTypeHelper: Fixed regexp
4.5.2
4.5.1
4.5.0
New sniffs:
SuperfluousExceptionNamingSniff: Reports usage of superfluous suffixExceptionfor exceptionsSuperfluousAbstractClassNamingSniff: Reports usage of superfluous prefix or suffixAbstractfor abstract classesSuperfluousInterfaceNamingSniff: Reports usage of superfluous prefix or suffixInterfacefor interfacesUseSpacingSniff: Enforces configurable number of lines before firstuse, after lastuseand between two different types ofuse(eg. betweenuse functionanduse const)EmptyCommentSniff: Reports empty commentsDocCommentSpacing: Enforces configurable number of lines before first content (description or annotation), after last content (description or annotation), between description and annotations, between two different annotations typesDisallowOneLinePropertyDocCommentSniff: Require comments with single-line content to be written as multi-liners (thanks to @Majkl578)RequireOneLinePropertyDocCommentSniff: Require comments with single-line content to be written as one-liners (thanks to @Majkl578)TypeCastSniff: Enforces using shorthand cast operators, forbids use of unset and binary cast operators (thanks to @Majkl578)
Improvements:
EarlyExitSniff: New check "Remove useless elseif to reduce code nesting"UnusedUsesSniff:ignoredAnnotationNames- To ignore specified annotation names (thanks to @xificurk)ReferenceUsedNamesOnlySniff: Improved annotations parsingFullyQualifiedClassNameInAnnotationSniff: Improved annotations parsingForbiddenAnnotationsSniff: Improved annotations parsingAlphaneticallySortedUsesSniff: Make error message more clear (thanks to @brettdorrans)
Fixes:
EarlyExitSniff: Reportelsewhen all conditions contain early exit