Skip to content

Commit 03807e3

Browse files
committed
Revert "Find unnecessary ternary operators"
This reverts commit c5fa47c.
1 parent 80a77d3 commit 03807e3

File tree

4 files changed

+0
-103
lines changed

4 files changed

+0
-103
lines changed

rules.neon

-5
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,10 @@ rules:
4242
- PHPStan\Rules\VariableVariables\VariableVariablesRule
4343

4444
conditionalTags:
45-
PHPStan\Rules\Operators\OperandsInTernaryOperatorRule:
46-
phpstan.rules.rule: %featureToggles.bleedingEdge%
4745
PHPStan\Rules\ForLoop\OverwriteVariablesWithForLoopInitRule:
4846
phpstan.rules.rule: %featureToggles.bleedingEdge%
4947

5048
services:
51-
-
52-
class: PHPStan\Rules\Operators\OperandsInTernaryOperatorRule
53-
5449
-
5550
class: PHPStan\Rules\BooleansInConditions\BooleanRuleHelper
5651

src/Rules/Operators/OperandsInTernaryOperatorRule.php

-39
This file was deleted.

tests/Rules/Operators/OperandsInTernaryOperatorRuleTest.php

-44
This file was deleted.

tests/Rules/Operators/data/operators.php

-15
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,3 @@ function (array $array, int $int, $mixed) {
109109

110110
explode($mixed, $mixed) + $int;
111111
};
112-
113-
foo() ? true : true;
114-
foo() ? true : null;
115-
foo() ? $object : true;
116-
foo() ? $object : false;
117-
foo() ? $object : null;
118-
foo() ? [] : [];
119-
foo() ? 'string_val' : 'string_val';
120-
foo() ? [23, 24] : [23, 25];
121-
foo() ? [23, 24] : [23, 24];
122-
foo() ? [1 => 1] : ['1' => 1];
123-
foo() ? [1 => 1] : ['asd' => 1];
124-
$object ?: $object;
125-
foo() ? false : true;
126-
foo() ? true : false;

0 commit comments

Comments
 (0)