Skip to content

Commit fa343a2

Browse files
Make this compatible with PHP 7
1 parent 6ab3098 commit fa343a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/StaticAnalysis/CodeUnitFindingVisitor.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use PhpParser\Node\Stmt\Interface_;
2727
use PhpParser\Node\Stmt\Trait_;
2828
use PhpParser\Node\UnionType;
29+
use PhpParser\NodeAbstract;
2930
use PhpParser\NodeTraverser;
3031
use PhpParser\NodeVisitorAbstract;
3132
use SebastianBergmann\Complexity\CyclomaticComplexityCalculatingVisitor;
@@ -330,7 +331,10 @@ private function intersectionTypeAsString(IntersectionType $node): string
330331
return implode('&', $types);
331332
}
332333

333-
private function typeAsString(Identifier|Name $node): string
334+
/**
335+
* @psalm-param Identifier|Name $node $node
336+
*/
337+
private function typeAsString(NodeAbstract $node): string
334338
{
335339
if ($node instanceof Name) {
336340
return $node->toCodeString();

0 commit comments

Comments
 (0)