We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89ebb98 commit cf0a8a9Copy full SHA for cf0a8a9
src/NodeTypeResolver/PHPStan/Scope/NodeVisitor/PhpVersionConditionNodeVisitor.php
@@ -24,14 +24,12 @@ public function __construct(
24
25
public function enterNode(Node $node): ?Node
26
{
27
- if ($node instanceof Ternary || $node instanceof If_) {
28
- if ($this->hasVersionCompareCond($node)) {
29
- SimpleNodeTraverser::decorateWithAttributeValue(
30
- [$node->if, $node->else],
31
- AttributeKey::PHP_VERSION_CONDITIONED,
32
- true
33
- );
34
- }
+ if (($node instanceof Ternary || $node instanceof If_) && $this->hasVersionCompareCond($node)) {
+ SimpleNodeTraverser::decorateWithAttributeValue(
+ [$node->if, $node->else],
+ AttributeKey::PHP_VERSION_CONDITIONED,
+ true
+ );
35
}
36
37
return null;
0 commit comments