inline short condition

This commit is contained in:
Tomas Votruba 2018-05-17 19:08:20 +02:00
parent e40436b89c
commit 5c3212629c

View File

@ -76,9 +76,7 @@ final class UnnecessaryTernaryExpressionRector extends AbstractRector
$ifExpression = $ternaryExpression->if;
$elseExpression = $ternaryExpression->else;
if (! $ifExpression instanceof ConstFetch
|| ! $elseExpression instanceof ConstFetch
) {
if (! $ifExpression instanceof ConstFetch || ! $elseExpression instanceof ConstFetch) {
return false;
}