Skip to content

1.2.0 - 2023-12-02

Compare
Choose a tag to compare
@jrfnl jrfnl released this 02 Dec 14:32
· 8 commits to stable since this release
78b2cae

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.

Other

  • Various housekeeping.