File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 14
14
use function array_flip ;
15
15
use function array_intersect ;
16
16
use function array_intersect_key ;
17
+ use function array_map ;
17
18
use function count ;
18
19
use function explode ;
19
20
use function file_get_contents ;
@@ -86,11 +87,10 @@ public static function fromXdebugWithPathCoverage(array $rawCoverage): self
86
87
87
88
public static function fromUncoveredFile (string $ filename , FileAnalyser $ analyser ): self
88
89
{
89
- $ lineCoverage = [];
90
-
91
- foreach ($ analyser ->executableLinesIn ($ filename ) as $ line => $ branch ) {
92
- $ lineCoverage [$ line ] = Driver::LINE_NOT_EXECUTED ;
93
- }
90
+ $ lineCoverage = array_map (
91
+ static fn (): int => Driver::LINE_NOT_EXECUTED ,
92
+ $ analyser ->executableLinesIn ($ filename ),
93
+ );
94
94
95
95
return new self ([$ filename => $ lineCoverage ], []);
96
96
}
You can’t perform that action at this time.
0 commit comments