You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Universal
🔧 📊 📚 New Universal.Attributes.BracketSpacing sniff to enforce a fixed number of spaces on the inside of attribute block brackets. #386, #406
The sniff offers the following properties to influence its behaviour:
spacing (defaults to 0).
ignoreNewlines (defaults to false).
When new lines are allowed (ignoreNewlines=true) and a new line is found, the sniff will verify that there are no superfluous blank lines at the start/end of an attribute block.
🔧 📊 📚 New Universal.Attributes.DisallowAttributeParentheses sniff to forbid parentheses for attribute instantiations without arguments. #387, #409
🔧 📊 📚 New Universal.Attributes.RequireAttributeParentheses sniff to demand that all attribute instantiations always use parentheses, even if no argument is passed. #387, #410
🔧 📊 📚 New Universal.Attributes.TrailingComma sniff to demand a trailing comma for multi-line, multi-attribute attribute blocks and forbid trailing commas in single-line attribute blocks and in multi-line attributes containing only a single attribute. #397, #413
🔧 📊 📚 New Universal.PHP.DisallowExitDieParentheses sniff to forbid invocations of exit/die with parentheses when no argument is passed. #399
🔧 📊 📚 New Universal.PHP.RequireExitDieParentheses sniff to demand that invocations of exit/die always use parentheses, even if no argument is passed. #398
🔧 📚 New Universal.WhiteSpace.FirstClassCallableSpacing sniff to enforce consistent spacing around the ellipses for first class callables. #385
The sniff offers the following property to influence its behaviour: spacing (defaults to 0).
Changed
Universal
Universal.WhiteSpace.CommaSpacing: improved handling of commas in PHP attributes. #391, #412
The spacing after a trailing comma (after the last attribute in a block) will no longer be checked to prevent potential conflicts with attribute bracket spacing sniffs.
Spacing errors for commas between attributes in an attribute block will now get an *InAttributeBlock error code suffix, so in-/excluding them selectively is more straight-forward.
Note: spacing around commas between parameters passed to an attribute will still be reported with the *InFunctionCall error code suffix, same as before.
Metrics for comma spacing in attribute blocks is now also measured and reported separately.
Other
Composer: The minimum PHP_CodeSniffer requirement has been updated to ^3.13.5 || ^4.0.1 (was ^3.13.4 || ^4.0.0). #408
Composer: The minimum PHPCSUtils requirement has been updated to ^1.2.0 (was ^1.1.2). #408