Releases
6.0.0
New sniffs
RequireArrowFunctionSniff
: Requires arrow functions
DisallowArrowFunctionSniff
: Disallows arrow functions
RequireNumericLiteralSeparatorSniff
: Requires use of numeric literal separators
DisallowNumericLiteralSeparatorSniff
: Disallows numeric literal separators
RequireNowdocSniff
: Requires nowdoc syntax instead of heredoc when possible
ReferenceSpacingSniff
: Enforces configurable number of spaces after reference
DisallowReferenceSniff
: Disallows references
RequireExplicitAssertionSniff
: Requires assertion via assert()
instead of inline documentation comments.
ParameterTypeHintSniff
: Previously part of TypeHintDeclarationSniff
PropertyTypeHintSniff
: Previously part of TypeHintDeclarationSniff
ReturnTypeHintSniff
: Previously part of TypeHintDeclarationSniff
UselessFunctionDocCommentSniff
: Previously part of TypeHintDeclarationSniff
BlockControlStructureSpacingSniff
: Previously part of ControlStructureSpacingSniff
JumpStatementsSpacingSniff
: Previously part of ControlStructureSpacingSniff
Improvements
PHP 7.4 support
Arrow functions support
Array shapes in phpDocs support
PropertyTypeHintSniff
: Support for native type hints
InlineDocCommentDeclarationSniff
: Reports missing related variables or no assigment
InlineDocCommentDeclarationSniff
: Added support for doccomments after variable definition
InlineDocCommentDeclarationSniff
: Added support for list()
and short list []
TrailingArrayCommaSniff
: New option enableAfterHeredoc
DisallowMixedTypeHintSniff
: Added suppress support
UselessParenthesesSniff
: Reports more useless parentheses
Fixes
Fixed support of @method
annotation
InlineDocCommentDeclarationSniff
: Check really only inline doccomments
TrailingCommaInCallSniff
: Some calls were not reported
UselessParenthesesSniff
: Fixed false positive
NamespaceSpacingSniff
: Fixed false positive
UselessSemicolonSniff
: Fixed internal error
TypeNameMatchesFileNameSniff
: Files without namespaces should be reported too
UseSpacingSniff
: Don't report errors for use statements with comments right before or after
UselessVariableSniff
: Fixed false positive
UselessParameterDefaultValueSniff
: Fixed false positive
UnusedPrivateElementsSniff
: Fixed false positive
UnusedUsesSniff
: Better handle php open tags (thanks to @donatj )
RequireCombinedAssignmentOperatorSniff
: Fixed false positive
UselessInheritDocCommentSniff
: Fixed internal error
RequireShortTernaryOperatorSniff
: Fix token overrun (thanks to @donatj )
Fix compatibility with non-Composer installs of PHPCS (thanks to @jrfnl )
⚠️ BC breaks
TypeHintDeclarationSniff
is dead, long live ParameterTypeHintSniff
, PropertyTypeHintSniff
, ReturnTypeHintSniff
and UselessFunctionDocCommentSniff
ControlStructureSpacingSniff
is dead, long live BlockControlStructureSpacingSniff
and JumpStatementsSpacingSniff
(thanks to @grongor )
You can’t perform that action at this time.