File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -577,8 +577,33 @@ private function initializeFilesThatAreSeenTheFirstTime(array $data)
577577 if ($ this ->filter ->isFile ($ file ) && !isset ($ this ->data [$ file ])) {
578578 $ this ->data [$ file ] = array ('lines ' => array ());
579579
580- foreach ($ fileData ['lines ' ] as $ k => $ v ) {
581- $ this ->data [$ file ]['lines ' ][$ k ] = $ v == -2 ? null : array ();
580+ if ($ this ->pathCoverage ) {
581+ $ this ->data [$ file ]['branches ' ] = array ();
582+ $ this ->data [$ file ]['paths ' ] = array ();
583+
584+ foreach ($ fileData ['functions ' ] as $ functionName => $ functionData ) {
585+ $ this ->data [$ file ]['branches ' ][$ functionName ] = array ();
586+ $ this ->data [$ file ]['paths ' ][$ functionName ] = array ();
587+
588+ foreach ($ functionData ['branches ' ] as $ branch ) {
589+ $ this ->data [$ file ]['branches ' ][$ functionName ][] = array (
590+ 'line_start ' => $ branch ['line_start ' ],
591+ 'line_end ' => $ branch ['line_end ' ],
592+ 'tests ' => array ()
593+ );
594+ }
595+
596+ foreach ($ functionData ['paths ' ] as $ path ) {
597+ $ this ->data [$ file ]['paths ' ][$ functionName ][] = array (
598+ 'path ' => $ path ['path ' ],
599+ 'tests ' => array ()
600+ );
601+ }
602+ }
603+ }
604+
605+ foreach ($ fileData ['lines ' ] as $ lineNumber => $ flag ) {
606+ $ this ->data [$ file ]['lines ' ][$ lineNumber ] = $ flag == -2 ? null : array ();
582607 }
583608 }
584609 }
You can’t perform that action at this time.
0 commit comments