Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
4.4.4
Fixes:
ReferenceUsedNamesOnlySniff: Importing global functions and constants is not necessary in the global namespaceReferenceUsedNamesOnlySniff: Some references were ignored because of bug inallowFullyQualifiedNameForCollidingClassesoptionEarlyExitSniff: Fixed fixing of complex conditionsEarlyExitSniff: Improved fixing conditions with commentsEarlyExitSniff: Fixed fixing of two negative conditionsUnusedUsesSniff: Case mismatch should be reported in doccomments tooUnusedUsesSniff: All occurrences of case mismatch are reported nowUseStatementHelper: Anonymous function in function should not be detected asusestatement (thanks to @grongor)
4.4.3
4.4.2
4.4.1
4.4.0
New sniffs:
NewWithParenthesesSniff: Requirenewwith parenthesesRequireNullCoalesceOperatorSniff: Require usage of null coalesce operator when possibleEarlyExitSniff: Require usage of early exitForbiddenCommentsSniff: Reports forbidden comments in descriptions (thanks to @Majkl578)
Improvements:
ReferenceUsedNamesOnlySniff:searchAnnotations- Enables searching for mentions in@var,@param,@returnand@throwsannotations
Fixes:
UnusedPrivateElementsSniff: Properties and methods used in HEREDOC should not be reported as unused
4.3.2
4.3.1
Fixes:
TypeHintDeclarationSniff: Fixed object type varianceTypeHintDeclarationSniff: Fixed false positive when description contains variableReferenceUsedNamesOnlySniff: Fixed support for global functions and constantsDeclareStrictTypesSniff: Improved whitespace detection before declare()ReferencedNameHelper: declare() directives should not be considered as referenced name
4.3.0
Improvements:
TypeHintDeclarationSniff:enableObjectTypeHint- It's possible to enable/disableobjecttype hint supportReferenceUsedNamesOnlySniff: Functions and constants support is hopefully complete, see new options in README
Fixes:
ReferenceThrowableOnlySniff: Fixed fixableReferencedNameHelper: Methods returning reference should not be considered as a referenced name
4.2.1
4.2.0
Deprecated:
ClassConstantVisibilitySniff:enabled- Deprecated nowNullableTypeForNullDefaultValueSniff:enabled- Deprecated nowTypeHintDeclarationSniff:enableNullableTypeHints- Deprecated nowTypeHintDeclarationSniff:enableVoidTypeHint- Deprecated now
Improvements:
UseDoesNotStartWithBackslashSniff: Detects functions and constants nowUseDoesNotStartWithBackslashSniff: Sniff is now fixableDeclareStrictTypesSniff:newlinesCountAfterDeclare- Allows to set 0 to N newlines to be betweendeclareand next statementFullyQualifiedGlobalFunctionsSniff:exclude- List of global functions that are allowed not to be referenced via FQNFullyQualifiedGlobalConstantsSniff:exclude- List of global constants that are allowed not to be referenced via FQNClassConstantVisibilitySniff: Sniff is now fixable (thanks to @Majkl578)ClassConstantVisibilitySniff:fixable- The sniff is not fixable by default because we think it's better to decide about each constant one by one however you can enable fixability with this optionLongTypeHintsSniff: Sniff is now fixable
Fixes:
RequireYodaComparisonSniff: Fixed short array supportDisallowYodaComparisonSniff: Fixed short array supportUnusedPrivateElementsSniff: Fixed false positive for static propertiesUnusedPrivateElementsSniff: Fixed detection of write only propertiesUnusedPrivateElementsSniff: Fixed false positive when calling private method on the same classFullyQualifiedGlobalFunctionsSniff: Improved ignoring functions that are not globalFullyQualifiedGlobalConstantsSniff: Improved ignoring constants that are not globalReferencedNameHelper: Methods imported from trait should not be detected as referenced names