Skip to content

2.1.0

Choose a tag to compare

@kukulich kukulich released this 27 Apr 08:53
· 2040 commits to master since this release

New settings:

  • TypeHintDeclarationSniff: enableEachParameterAndReturnInspection - enables inspection and fixing of @param and @return annotations separately. Useful when you only want to document parameters or return values that could not be expressed natively (i.e. member types of array or Traversable) (thanks to @Majkl578)
  • ReturnTypeHintSpacingSniff: spacesCountBeforeColon - the number of spaces expected between closing brace and colon (thanks to @Majkl578)
  • ReferenceUsedNamesOnlySniff: allowFullyQualifiedGlobalClasses - allows using fully qualified names from global space (i.e. \DateTimeImmutable) (thanks to @Majkl578)
  • EmptyLinesAroundTypeBracesSniff: linesCountAfterOpeningBrace: allows to configure the number of lines after opening brace (thanks to @Majkl578)
  • EmptyLinesAroundTypeBracesSniff: linesCountBeforeClosingBrace: allows to configure the number of lines before closing brace (thanks to @Majkl578)

Fixes:

  • TypeHintDeclarationSniff: Fix UselessDocComment detection when function has parameters/returns, but doesn't have corresponding annotation (thanks to @Majkl578)
  • UnusedUsesSniff: Fix detection of partially referenced functions and constants (thanks to @Majkl578)
  • UseStatementHelper: Fix isTraitUse() to work with anonymous class (thanks to @Majkl578)
  • TypeHintDeclarationSniff: Disabled enableNullableTypeHints does not work with optional parameters
  • FullyQualifiedClassNameAfterKeywordSniff: Improved support for checking T_USE

And a lot of cleanup (thanks to @VasekPurchart and @Majkl578 )