File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -491,30 +491,27 @@ protected function applyCoversAnnotationFilter(&$data, $id)
491491
492492 if ($ this ->checkForUnintentionallyCoveredCode &&
493493 $ count != count ($ data )) {
494- $ unintentionallyCoveredCode = TRUE ;
494+ throw new PHP_CodeCoverage_Exception_UnintentionallyCoveredCode ;
495495 }
496496
497497 foreach (array_keys ($ data ) as $ filename ) {
498498 $ count = count ($ data [$ filename ]);
499499
500+
500501 $ data [$ filename ] = array_intersect_key (
501502 $ data [$ filename ], array_flip ($ linesToBeCovered [$ filename ])
502503 );
503504
504505 if ($ this ->checkForUnintentionallyCoveredCode &&
505506 $ count != count ($ data [$ filename ])) {
506- $ unintentionallyCoveredCode = TRUE ;
507+ throw new PHP_CodeCoverage_Exception_UnintentionallyCoveredCode ;
507508 }
508509 }
509510 }
510511
511512 else if ($ this ->forceCoversAnnotation ) {
512513 $ data = array ();
513514 }
514-
515- if ($ unintentionallyCoveredCode ) {
516- throw new PHP_CodeCoverage_Exception_UnintentionallyCoveredCode ;
517- }
518515 }
519516
520517 /**
You can’t perform that action at this time.
0 commit comments