Skip to content

Commit 1720a5d

Browse files
committed
Update File.php
1 parent a3216ce commit 1720a5d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Node/File.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -602,33 +602,33 @@ private function processFunctions(array $functions): void
602602
$this->codeUnitsByLine[$lineNumber] = [&$this->functions[$functionName]];
603603
}
604604

605-
if (isset($this->functionCoverageData[$functionName]['branches'])) {
605+
if (isset($this->functionCoverageData[$functionName])) {
606606
$this->functions[$functionName]['executableBranches'] = count(
607-
$this->functionCoverageData[$functionName]['branches'],
607+
$this->functionCoverageData[$functionName]->branches,
608608
);
609609

610610
$this->functions[$functionName]['executedBranches'] = count(
611611
array_filter(
612-
$this->functionCoverageData[$functionName]['branches'],
613-
static function (array $branch)
612+
$this->functionCoverageData[$functionName]->branches,
613+
static function (ProcessedBranchCoverageData $branch)
614614
{
615-
return (bool) $branch['hit'];
615+
return (bool) $branch->hit;
616616
},
617617
),
618618
);
619619
}
620620

621-
if (isset($this->functionCoverageData[$functionName]['paths'])) {
621+
if (isset($this->functionCoverageData[$functionName])) {
622622
$this->functions[$functionName]['executablePaths'] = count(
623-
$this->functionCoverageData[$functionName]['paths'],
623+
$this->functionCoverageData[$functionName]->paths,
624624
);
625625

626626
$this->functions[$functionName]['executedPaths'] = count(
627627
array_filter(
628-
$this->functionCoverageData[$functionName]['paths'],
629-
static function (array $path)
628+
$this->functionCoverageData[$functionName]->paths,
629+
static function (ProcessedPathCoverageData $path)
630630
{
631-
return (bool) $path['hit'];
631+
return (bool) $path->hit;
632632
},
633633
),
634634
);

0 commit comments

Comments
 (0)