Skip to content

Commit 4c075c4

Browse files
staabmsebastianbergmann
authored andcommitted
Update File.php
1 parent 942c367 commit 4c075c4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Node/File.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -539,33 +539,33 @@ private function processFunctions(array $functions): void
539539
$this->codeUnitsByLine[$lineNumber] = [&$this->functions[$functionName]];
540540
}
541541

542-
if (isset($this->functionCoverageData[$functionName]['branches'])) {
543-
$this->functions[$functionName]->executableBranches = count(
544-
$this->functionCoverageData[$functionName]['branches'],
542+
if (isset($this->functionCoverageData[$functionName])) {
543+
$this->functions[$functionName]['executableBranches'] = count(
544+
$this->functionCoverageData[$functionName]->branches,
545545
);
546546

547547
$this->functions[$functionName]->executedBranches = count(
548548
array_filter(
549-
$this->functionCoverageData[$functionName]['branches'],
550-
static function (array $branch)
549+
$this->functionCoverageData[$functionName]->branches,
550+
static function (ProcessedBranchCoverageData $branch)
551551
{
552-
return (bool) $branch['hit'];
552+
return (bool) $branch->hit;
553553
},
554554
),
555555
);
556556
}
557557

558-
if (isset($this->functionCoverageData[$functionName]['paths'])) {
559-
$this->functions[$functionName]->executablePaths = count(
560-
$this->functionCoverageData[$functionName]['paths'],
558+
if (isset($this->functionCoverageData[$functionName])) {
559+
$this->functions[$functionName]['executablePaths'] = count(
560+
$this->functionCoverageData[$functionName]->paths,
561561
);
562562

563563
$this->functions[$functionName]->executedPaths = count(
564564
array_filter(
565-
$this->functionCoverageData[$functionName]['paths'],
566-
static function (array $path)
565+
$this->functionCoverageData[$functionName]->paths,
566+
static function (ProcessedPathCoverageData $path)
567567
{
568-
return (bool) $path['hit'];
568+
return (bool) $path->hit;
569569
},
570570
),
571571
);

0 commit comments

Comments
 (0)