packagist squizlabs/php_codesniffer 3.11.3
3.11.3 - 2025-01-23

latest releases: 4.0.x-dev, dev-master, dev-feature/773-safeguard-against-duplicate-test-markers...
10 hours ago

Changed

  • Generic.ControlStructures.InlineControlStructure no longer unnecessarily listens for T_SWITCH tokens. #595
  • Squiz.Functions.FunctionDeclarationArgumentSpacing: improvements to error message for SpaceBeforeComma error. #783
  • The following sniff(s) have received efficiency improvements:
  • Various housekeeping, including improvements to the tests and documentation.

Fixed

  • Fixed bug #620 : Squiz.Functions.FunctionDeclarationArgumentSpacing: newlines after type will now be handled by the fixer. This also prevents a potential fixer conflict.
  • Fixed bug #782 : Tokenizer/PHP: prevent an "Undefined array key" notice during live coding for unfinished arrow functions.
  • Fixed bug #783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line after reference token was not flagged nor fixed.
  • Fixed bug #783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line after variadic token was not flagged nor fixed.
  • Fixed bug #783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: new line before/after the equal sign for default values was not flagged nor fixed when equalsSpacing was set to 0.
  • Fixed bug #783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer conflict when a new line is found before/after the equal sign for default values and equalsSpacing was set to 1.
  • Fixed bug #783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer for spacing before/after equal sign could inadvertently remove comment.
  • Fixed bug #783 : Squiz.Functions.FunctionDeclarationArgumentSpacing: fixer will now handle comments between the end of a parameter and a comma more cleanly.
  • Fixed bug #784 : Squiz.WhiteSpace.FunctionSpacing: prevent fixer conflict when a multi-line docblock would start on the same line as the function close curly being examined.

Statistics

Closed: 0 issues
Merged: 14 pull requests

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

Please consider funding the PHP_CodeSniffer project. If you already do so: thank you!

Don't miss a new php_codesniffer release

NewReleases is sending notifications on new releases.