packagist squizlabs/php_codesniffer 3.10.2
3.10.2 - 2024-07-22

latest releases: dev-feature/generators-add-tests, dev-feature/675-common-sniffcode-be-more-lenient, 4.0.x-dev...
3 months ago

Changed

Fixed

  • Fixed bug #513 : Generic.Functions.FunctionCallArgumentSpacing did not ignore the body of a match expressions passed as a function argument, which could lead to false positives.
  • Fixed bug #533 : Generic.WhiteSpace.DisallowTabIndent: tab indentation for heredoc/nowdoc closers will no longer be auto-fixed to prevent parse errors. The issue will still be reported.
    • The error code for heredoc/nowdoc indentation using tabs has been made more specific - TabsUsedHeredocCloser - to allow for selectively excluding the indentation check for heredoc/nowdoc closers.
    • Thanks to Juliette Reinders Folmer for the patch
  • Fixed bug #534 : Generic.WhiteSpace.DisallowSpaceIndent did not report on space indentation for PHP 7.3 flexible heredoc/nowdoc closers.
    • Closers using space indentation will be reported with a dedicated error code: SpacesUsedHeredocCloser.
    • Thanks to Juliette Reinders Folmer for the patch
  • Fixed bug #537 : Squiz.PHP.DisallowMultipleAssignments false positive for list assignments at the start of a new PHP block after an embedded PHP statement.
  • Fixed bug #551 : Squiz.PHP.DisallowMultipleAssignments prevent false positive for function parameters during live coding.
  • Fixed bug #554 : Generic.CodeAnalysis.UselessOverridingMethod edge case false negative when the call to the parent method would end on a PHP close tag.
  • Fixed bug #555 : Squiz.Classes.SelfMemberReference edge case false negative when the namespace declaration would end on a PHP close tag.

New Contributors

The PHP_CodeSniffer project is happy to welcome the following new contributor:
@biinari (with a whopping 9 merged PRs!)

We also welcome @klausi back to the project.

Furthermore, the project is happy to welcome @JetBrains as a corporate funder for the project, joining @Automattic, @humanmade and @godaddy.

Statistics

Closed: 2 issues
Merged: 30 pull requests

If you like to stay informed about releases and more, follow @phpcs on Mastodon or @PHP_CodeSniffer on X.

Don't miss a new php_codesniffer release

NewReleases is sending notifications on new releases.