Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ConstFecth on Interface #977

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/StaticAnalysis/ExecutableLinesFindingVisitor.php
Expand Up @@ -101,6 +101,7 @@ public function enterNode(Node $node): void
$node instanceof Node\Stmt\TryCatch ||
$node instanceof Node\Stmt\Use_ ||
$node instanceof Node\Stmt\UseUse ||
$node instanceof Node\Expr\ConstFetch ||
$node instanceof Node\Expr\Match_ ||
$node instanceof Node\Expr\Variable ||
$node instanceof Node\ComplexType ||
Expand Down
5 changes: 4 additions & 1 deletion tests/_files/source_for_branched_exec_lines.php
Expand Up @@ -422,7 +422,10 @@ function // 0
( // 0
$var2 // 0
= // 0
2 // 0
2, // 0
$var3 // 0
= // 0
null // 0
) // 0
use // 0
( // 0
Expand Down
1 change: 1 addition & 0 deletions tests/_files/source_for_branched_exec_lines_php80.php
Expand Up @@ -39,4 +39,5 @@ interface MyUnion
{
public function getNameIdentifier(): ?string;
public function hasClaim(bool|string $type, mixed $value): bool;
public function getClaims($type1 = null): array;
}