File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
rules/Php74/Rector/Ternary Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ public function getNodeTypes(): array
5252 public function refactor (Node $ node ): ?Node
5353 {
5454 if ($ node ->cond instanceof Ternary || $ node ->else instanceof Ternary) {
55+ // Chaining of short-ternaries (elvis operator) is stable and behaves reasonably
56+ $ isElvis = $ node ->cond instanceof Ternary && $ node ->cond ->if === null ;
57+ if ($ isElvis ) {
58+ return null ;
59+ }
5560 if ($ this ->parenthesizedNestedTernaryAnalyzer ->isParenthesized ($ this ->file , $ node )) {
5661 return null ;
5762 }
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ final class VersionResolver
1919 * @api
2020 * @var string
2121 */
22- public const PACKAGE_VERSION = '8376d26987ca4f6fc36f779b84c04d71900e14ac ' ;
22+ public const PACKAGE_VERSION = '2ed3aa83d8300798973e480e52c9c2ddd7fa6d00 ' ;
2323 /**
2424 * @api
2525 * @var string
2626 */
27- public const RELEASE_DATE = '2025-10-29 20:46:56 ' ;
27+ public const RELEASE_DATE = '2025-10-29 21:51:36 ' ;
2828 /**
2929 * @var int
3030 */
You can’t perform that action at this time.
0 commit comments