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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,36 @@ This projects adheres to [Keep a CHANGELOG](http://keepachangelog.com/) and uses
14
14
15
15
_Nothing yet._
16
16
17
+
## [1.2.0] - 2023-12-02
18
+
19
+
### Added
20
+
21
+
#### Universal
22
+
23
+
*:wrench::books: New `Universal.CodeAnalysis.NoDoubleNegative` sniff to detect double negatives (!!) and advise to use a boolean cast instead. Thanks [@diedexx] for reviewing. [#277]
24
+
*:wrench::books: 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]
25
+
*:wrench::bar_chart::books: New `Universal.PHP.LowercasePHPTag` sniff to enforce that the "PHP" in a PHP open tag is lowercase. Thanks [@fredden] for reviewing. [#276]
26
+
27
+
### Changed
28
+
29
+
#### NormalizedArrays
30
+
31
+
*`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]
32
+
These new error codes allow for selectively excluding that specific situation from triggering the sniff.
33
+
The new error codes are `FoundMultiLineCloserSameLine` (for `multiLine="forbid"`) and `MissingMultiLineCloserSameLine` (for `multiLine="enforce"`).
34
+
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.
Detects double negation `!!` in code, which is effectively the same as a boolean cast, but with a much higher cognitive load.
236
+
Also detects triple negation `!!!`, which is effectively the same as a single negation.
237
+
238
+
The sniff has modular error codes to allow for disabling individual checks. The error codes are: `FoundDouble`, `FoundDoubleWithInstanceof` (not auto-fixable) and `FoundTriple`.
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.
374
+
375
+
* This sniff contains an `allowOnly` property to set the preferred position for the operator.
376
+
Accepted values: (string) `"start"` or `"end"`. Defaults to `"start"`.
377
+
* Note: mid-line concatenation is still allowed and will not be flagged by this sniff.
0 commit comments