@@ -115,7 +115,8 @@ public function __construct($name, PHP_CodeCoverage_Report_Node $parent, array $
115115 {
116116 if (!is_bool ($ cacheTokens )) {
117117 throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory (
118- 1 , 'boolean '
118+ 1 ,
119+ 'boolean '
119120 );
120121 }
121122
@@ -373,19 +374,13 @@ protected function calculateStatistics()
373374 // Start line of a class.
374375 if (isset ($ this ->startLines [$ lineNumber ]['className ' ])) {
375376 $ currentClass = &$ this ->startLines [$ lineNumber ];
376- }
377-
378- // Start line of a trait.
377+ } // Start line of a trait.
379378 elseif (isset ($ this ->startLines [$ lineNumber ]['traitName ' ])) {
380379 $ currentTrait = &$ this ->startLines [$ lineNumber ];
381- }
382-
383- // Start line of a method.
380+ } // Start line of a method.
384381 elseif (isset ($ this ->startLines [$ lineNumber ]['methodName ' ])) {
385382 $ currentMethod = &$ this ->startLines [$ lineNumber ];
386- }
387-
388- // Start line of a function.
383+ } // Start line of a function.
389384 elseif (isset ($ this ->startLines [$ lineNumber ]['functionName ' ])) {
390385 $ currentFunction = &$ this ->startLines [$ lineNumber ];
391386 }
@@ -436,19 +431,13 @@ protected function calculateStatistics()
436431 // End line of a class.
437432 if (isset ($ this ->endLines [$ lineNumber ]['className ' ])) {
438433 unset($ currentClass );
439- }
440-
441- // End line of a trait.
434+ } // End line of a trait.
442435 elseif (isset ($ this ->endLines [$ lineNumber ]['traitName ' ])) {
443436 unset($ currentTrait );
444- }
445-
446- // End line of a method.
437+ } // End line of a method.
447438 elseif (isset ($ this ->endLines [$ lineNumber ]['methodName ' ])) {
448439 unset($ currentMethod );
449- }
450-
451- // End line of a function.
440+ } // End line of a function.
452441 elseif (isset ($ this ->endLines [$ lineNumber ]['functionName ' ])) {
453442 unset($ currentFunction );
454443 }
@@ -465,7 +454,8 @@ protected function calculateStatistics()
465454 }
466455
467456 $ method ['crap ' ] = $ this ->crap (
468- $ method ['ccn ' ], $ method ['coverage ' ]
457+ $ method ['ccn ' ],
458+ $ method ['coverage ' ]
469459 );
470460
471461 $ trait ['ccn ' ] += $ method ['ccn ' ];
@@ -483,7 +473,8 @@ protected function calculateStatistics()
483473 }
484474
485475 $ trait ['crap ' ] = $ this ->crap (
486- $ trait ['ccn ' ], $ trait ['coverage ' ]
476+ $ trait ['ccn ' ],
477+ $ trait ['coverage ' ]
487478 );
488479 }
489480
@@ -497,7 +488,8 @@ protected function calculateStatistics()
497488 }
498489
499490 $ method ['crap ' ] = $ this ->crap (
500- $ method ['ccn ' ], $ method ['coverage ' ]
491+ $ method ['ccn ' ],
492+ $ method ['coverage ' ]
501493 );
502494
503495 $ class ['ccn ' ] += $ method ['ccn ' ];
@@ -515,7 +507,8 @@ protected function calculateStatistics()
515507 }
516508
517509 $ class ['crap ' ] = $ this ->crap (
518- $ class ['ccn ' ], $ class ['coverage ' ]
510+ $ class ['ccn ' ],
511+ $ class ['coverage ' ]
519512 );
520513 }
521514 }
@@ -662,7 +655,8 @@ protected function crap($ccn, $coverage)
662655 }
663656
664657 return sprintf (
665- '%01.2F ' , pow ($ ccn , 2 ) * pow (1 - $ coverage /100 , 3 ) + $ ccn
658+ '%01.2F ' ,
659+ pow ($ ccn , 2 ) * pow (1 - $ coverage /100 , 3 ) + $ ccn
666660 );
667661 }
668662}
0 commit comments