File tree 1 file changed +4
-10
lines changed
1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 9
9
*/
10
10
namespace SebastianBergmann \CodeCoverage \StaticAnalysis ;
11
11
12
- use function array_unique ;
13
- use function sort ;
14
12
use PhpParser \Node ;
15
13
use PhpParser \Node \Expr \BinaryOp ;
16
14
use PhpParser \Node \Expr \CallLike ;
44
42
final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
45
43
{
46
44
/**
47
- * @psalm-var list< int>
45
+ * @psalm-var array<int, int>
48
46
*/
49
47
private $ executableLines = [];
50
48
@@ -67,19 +65,15 @@ public function enterNode(Node $node): void
67
65
return ;
68
66
}
69
67
70
- $ this ->executableLines [] = $ line ;
68
+ $ this ->executableLines [$ line ] = $ line ;
71
69
}
72
70
73
71
/**
74
- * @psalm-return list< int>
72
+ * @psalm-return array<int, int>
75
73
*/
76
74
public function executableLines (): array
77
75
{
78
- $ executableLines = array_unique ($ this ->executableLines );
79
-
80
- sort ($ executableLines );
81
-
82
- return $ executableLines ;
76
+ return $ this ->executableLines ;
83
77
}
84
78
85
79
private function savePropertyLines (Node $ node ): void
You can’t perform that action at this time.
0 commit comments