Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
7.2.0
🆕 New sniffs
- Added
SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse - Added
SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse
🔧 Improvements
- Support for offset access type syntax in annotations
- Support for
@phpstan-assert/@psalm-assertannotations SlevomatCodingStandard.Whitespaces.DuplicateSpacesSniff: New optionignoreSpacesInMatchSlevomatCodingStandard.Functions.DisallowTrailingCommaInCall: New optiononlySingleLineSlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration: New optiononlySingleLine
🐛 Fixes
SlevomatCodingStandard.TypeHints.ReturnTypeHint: Fixed internal errorSlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn: Fixed internal errorSlevomatCodingStandard.Functions.RequireSingleLineCall: Fixed false positiveSlevomatCodingStandard.Variables.UnusedVariable: Resolve false positives with increment/decrement operators (thanks to @aadmathijssen)SlevomatCodingStandard.Variables.UnusedVariable: allow increment/decrement operators after yield (thanks to @aadmathijssen)
7.1.0
⚠️ Removed support for PHP 7.1
🆕 New sniffs
- Added
SlevomatCodingStandard.Classes.RequireAbstractOrFinal(thanks to @roslov) - Added
SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch(thanks to @olsavmic)
🔧 Improvements
- Support for conditional types in annotations
SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator: Added optionignoreOctalNumbersSlevomatCodingStandard.Functions.FunctionLength: New optionsincludeCommentsandincludeWhitespace(thanks to @bkdotcom)
7.0.20
🐛 Fixes
SlevomatCodingStandard.TypeHints.ReturnTypeHint: Improved - Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.ParameterTypeHint: Improved - Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.PropertyTypeHint: Improved - Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.ReturnTypeHint: It was not possible to suppress some errorsSlevomatCodingStandard.Classes.ParentCallSpacing: Fixed false positive
7.0.19
🐛 Fixes
SlevomatCodingStandard.TypeHints.PropertyTypeHint: Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.ParameterTypeHint: Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.ReturnTypeHint: Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.ControlStructures.RequireYodaComparison: Fixed false positives withmatchSlevomatCodingStandard.ControlStructures.DisallowYodaComparison: Fixed false positives withmatchSlevomatCodingStandard.Commenting.DocCommentSpacing: Fixed internal errorSlevomatCodingStandard.Variables.UnusedVariable: Fixed false positiveSlevomatCodingStandard.Variables.UnusedVariable: Fixed missing report when optionignoreUnusedValuesWhenOnlyKeysAreUsedInForeachis enabledSlevomatCodingStandard.Functions.RequireTrailingCommaInCall: Fixed false positiveReferencedNameHelper: Fixed searching of class references in heredoc- Ignore invalid
@templateand@typeannotations
7.0.18
7.0.17
🐛 Fixes
SlevomatCodingStandard.Namespaces.UnusedUses: Improved detection of relative name in generic annotationSlevomatCodingStandard.Classes.ClassConstantVisibility: Added support for final constantsSlevomatCodingStandard.Functions.RequireTrailingCommaInCall: Skip instances on same line as closing parenthesis (thanks to @donatj)
7.0.16
🐛 Fixes
SlevomatCodingStandard.Classes.ModernClassNameReference: Don't flag method declarations (thanks to @jrfnl)SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration: Fixed false positiveSlevomatCodingStandard.ControlStructures.NewWithParentheses: Fixed false positive- Appended logic in
ReferencedNameHelperfor find names of class inside double quotes (thanks to @AIlkiv)
7.0.15
7.0.14
🐛 Fixes
InlineDocCommentDeclarationSniff: Don't report missing assigment for$thisParameterTypeHintSniff,ReturnTypeHintSniff,PropertyTypeHintSniff: Short nullable is now reported as useless annotation too- Don't try to find references in double quoted string - it's difficult to parse it with PHPCS