@@ -551,17 +551,33 @@ private function processFunctions(array $functions): void
551551 }
552552
553553 if (isset ($ this ->functionCoverageData [$ functionName ]['branches ' ])) {
554- $ this ->functions [$ functionName ]['executableBranches ' ] = count ($ this ->functionCoverageData [$ functionName ]['branches ' ]);
555- $ this ->functions [$ functionName ]['executedBranches ' ] = count (array_filter ($ this ->functionCoverageData [$ functionName ]['branches ' ], static function (array $ branch ) {
556- return (bool ) $ branch ['hit ' ];
557- }));
554+ $ this ->functions [$ functionName ]['executableBranches ' ] = count (
555+ $ this ->functionCoverageData [$ functionName ]['branches ' ]
556+ );
557+
558+ $ this ->functions [$ functionName ]['executedBranches ' ] = count (
559+ array_filter (
560+ $ this ->functionCoverageData [$ functionName ]['branches ' ],
561+ static function (array $ branch ) {
562+ return (bool ) $ branch ['hit ' ];
563+ }
564+ )
565+ );
558566 }
559567
560568 if (isset ($ this ->functionCoverageData [$ functionName ]['paths ' ])) {
561- $ this ->functions [$ functionName ]['executablePaths ' ] = count ($ this ->functionCoverageData [$ functionName ]['paths ' ]);
562- $ this ->functions [$ functionName ]['executedPaths ' ] = count (array_filter ($ this ->functionCoverageData [$ functionName ]['paths ' ], static function (array $ path ) {
563- return (bool ) $ path ['hit ' ];
564- }));
569+ $ this ->functions [$ functionName ]['executablePaths ' ] = count (
570+ $ this ->functionCoverageData [$ functionName ]['paths ' ]
571+ );
572+
573+ $ this ->functions [$ functionName ]['executedPaths ' ] = count (
574+ array_filter (
575+ $ this ->functionCoverageData [$ functionName ]['paths ' ],
576+ static function (array $ path ) {
577+ return (bool ) $ path ['hit ' ];
578+ }
579+ )
580+ );
565581 }
566582
567583 $ this ->numExecutableBranches += $ this ->functions [$ functionName ]['executableBranches ' ];
@@ -594,17 +610,33 @@ private function newMethod(string $className, string $methodName, array $method,
594610 $ key = $ className . '-> ' . $ methodName ;
595611
596612 if (isset ($ this ->functionCoverageData [$ key ]['branches ' ])) {
597- $ methodData ['executableBranches ' ] = count ($ this ->functionCoverageData [$ key ]['branches ' ]);
598- $ methodData ['executedBranches ' ] = count (array_filter ($ this ->functionCoverageData [$ key ]['branches ' ], static function (array $ branch ) {
599- return (bool ) $ branch ['hit ' ];
600- }));
613+ $ methodData ['executableBranches ' ] = count (
614+ $ this ->functionCoverageData [$ key ]['branches ' ]
615+ );
616+
617+ $ methodData ['executedBranches ' ] = count (
618+ array_filter (
619+ $ this ->functionCoverageData [$ key ]['branches ' ],
620+ static function (array $ branch ) {
621+ return (bool ) $ branch ['hit ' ];
622+ }
623+ )
624+ );
601625 }
602626
603627 if (isset ($ this ->functionCoverageData [$ key ]['paths ' ])) {
604- $ methodData ['executablePaths ' ] = count ($ this ->functionCoverageData [$ key ]['paths ' ]);
605- $ methodData ['executedPaths ' ] = count (array_filter ($ this ->functionCoverageData [$ key ]['paths ' ], static function (array $ path ) {
606- return (bool ) $ path ['hit ' ];
607- }));
628+ $ methodData ['executablePaths ' ] = count (
629+ $ this ->functionCoverageData [$ key ]['paths ' ]
630+ );
631+
632+ $ methodData ['executedPaths ' ] = count (
633+ array_filter (
634+ $ this ->functionCoverageData [$ key ]['paths ' ],
635+ static function (array $ path ) {
636+ return (bool ) $ path ['hit ' ];
637+ }
638+ )
639+ );
608640 }
609641
610642 return $ methodData ;
0 commit comments