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.
The key has expired.
Added
Universal
🔧 📚 New Universal.CodeAnalysis.NoDoubleNegative sniff to detect double negatives (!!) and advise to use a boolean cast instead. Thanks @diedexx for reviewing. #277
🔧 📚 New Universal.Operators.ConcatPosition sniff to enforce that the concatenation operator for multi-line concatenations is in a preferred position, either always at the start of the next line or always at the end of the previous line. #294
🔧 📊 📚 New Universal.PHP.LowercasePHPTag sniff to enforce that the "PHP" in a PHP open tag is lowercase. Thanks @fredden for reviewing. #276
Changed
NormalizedArrays
NormalizedArrays.Arrays.CommaAfterLast: the sniff now has two extra error codes to distinguish between multi-line arrays with the last array item on the same line as the array closer vs the last array item being on a line before the array closer. Thanks @stronk7 for suggesting and patching this. #283, #284
These new error codes allow for selectively excluding that specific situation from triggering the sniff.
The new error codes are FoundMultiLineCloserSameLine (for multiLine="forbid") and MissingMultiLineCloserSameLine (for multiLine="enforce").
The pre-existing FoundMultiLine and FoundSingleLine error codes continue to be used for multi-line arrays with the last array item on a different line than the array closer.