Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
6.0.5
Fixes
EarlyExitSniff
: Fixed internal error
Improvements
- Support of phpstan/phpdoc-parser 0.4.2 (thanks to @jeroennoten)
6.0.4
6.0.3
6.0.2
6.0.1
6.0.0
New sniffs
RequireArrowFunctionSniff
: Requires arrow functionsDisallowArrowFunctionSniff
: Disallows arrow functionsRequireNumericLiteralSeparatorSniff
: Requires use of numeric literal separatorsDisallowNumericLiteralSeparatorSniff
: Disallows numeric literal separatorsRequireNowdocSniff
: Requires nowdoc syntax instead of heredoc when possibleReferenceSpacingSniff
: Enforces configurable number of spaces after referenceDisallowReferenceSniff
: Disallows referencesRequireExplicitAssertionSniff
: Requires assertion viaassert()
instead of inline documentation comments.ParameterTypeHintSniff
: Previously part ofTypeHintDeclarationSniff
PropertyTypeHintSniff
: Previously part ofTypeHintDeclarationSniff
ReturnTypeHintSniff
: Previously part ofTypeHintDeclarationSniff
UselessFunctionDocCommentSniff
: Previously part ofTypeHintDeclarationSniff
BlockControlStructureSpacingSniff
: Previously part ofControlStructureSpacingSniff
JumpStatementsSpacingSniff
: Previously part ofControlStructureSpacingSniff
Improvements
- PHP 7.4 support
- Arrow functions support
- Array shapes in phpDocs support
PropertyTypeHintSniff
: Support for native type hintsInlineDocCommentDeclarationSniff
: Reports missing related variables or no assigmentInlineDocCommentDeclarationSniff
: Added support for doccomments after variable definitionInlineDocCommentDeclarationSniff
: Added support forlist()
and short list[]
TrailingArrayCommaSniff
: New optionenableAfterHeredoc
DisallowMixedTypeHintSniff
: Added suppress supportUselessParenthesesSniff
: Reports more useless parentheses
Fixes
- Fixed support of
@method
annotation InlineDocCommentDeclarationSniff
: Check really only inline doccommentsTrailingCommaInCallSniff
: Some calls were not reportedUselessParenthesesSniff
: Fixed false positiveNamespaceSpacingSniff
: Fixed false positiveUselessSemicolonSniff
: Fixed internal errorTypeNameMatchesFileNameSniff
: Files without namespaces should be reported tooUseSpacingSniff
: Don't report errors for use statements with comments right before or afterUselessVariableSniff
: Fixed false positiveUselessParameterDefaultValueSniff
: Fixed false positiveUnusedPrivateElementsSniff
: Fixed false positiveUnusedUsesSniff
: Better handle php open tags (thanks to @donatj)RequireCombinedAssignmentOperatorSniff
: Fixed false positiveUselessInheritDocCommentSniff
: Fixed internal errorRequireShortTernaryOperatorSniff
: Fix token overrun (thanks to @donatj)- Fix compatibility with non-Composer installs of PHPCS (thanks to @jrfnl)
⚠️ BC breaks
TypeHintDeclarationSniff
is dead, long liveParameterTypeHintSniff
,PropertyTypeHintSniff
,ReturnTypeHintSniff
andUselessFunctionDocCommentSniff
ControlStructureSpacingSniff
is dead, long liveBlockControlStructureSpacingSniff
andJumpStatementsSpacingSniff
(thanks to @grongor)
5.0.4
5.0.3
5.0.2
5.0.1
Fixes
DisallowArrayTypeHintSyntaxSniff
: Follow type hint when converting to generics syntax (thanks to @thewilkybarkid)UnusedVariableSniff
: Fixed false positiveUselessVariableSniff
: Fixed false positiveUselessParenthesesSniff
: Fixed false positiveTypeHintDeclarationSniff
: Invalid annotations should be ignored
Improvements
UseStatementHelper
: SpeedupUseStatementHelper
: Mark method getUseStatements() as deprecated