File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -871,6 +871,7 @@ protected function getLinesToBeIgnored($filename)
871871 $ ignore = FALSE ;
872872 $ stop = FALSE ;
873873 $ lines = file ($ filename );
874+ $ numLines = count ($ lines );
874875
875876 foreach ($ lines as $ index => $ line ) {
876877 if (!trim ($ line )) {
@@ -1011,6 +1012,8 @@ protected function getLinesToBeIgnored($filename)
10111012 }
10121013 }
10131014
1015+ $ this ->ignoredLines [$ filename ][] = $ numLines + 1 ;
1016+
10141017 $ this ->ignoredLines [$ filename ] = array_unique (
10151018 $ this ->ignoredLines [$ filename ]
10161019 );
Original file line number Diff line number Diff line change @@ -574,7 +574,8 @@ public function testGetLinesToBeIgnored()
574574 35 ,
575575 36 ,
576576 37 ,
577- 38
577+ 38 ,
578+ 39
578579 ),
579580 $ this ->getLinesToBeIgnored ->invoke (
580581 $ this ->coverage ,
@@ -589,7 +590,7 @@ public function testGetLinesToBeIgnored()
589590 public function testGetLinesToBeIgnored2 ()
590591 {
591592 $ this ->assertEquals (
592- array (1 ),
593+ array (1 , 5 ),
593594 $ this ->getLinesToBeIgnored ->invoke (
594595 $ this ->coverage ,
595596 TEST_FILES_PATH . 'source_without_ignore.php '
@@ -613,7 +614,8 @@ public function testGetLinesToBeIgnoredOneLineAnnotations()
613614 7 ,
614615 8 ,
615616 9 ,
616- 13
617+ 13 ,
618+ 14
617619 ),
618620 $ this ->getLinesToBeIgnored ->invoke (
619621 $ this ->coverage ,
You can’t perform that action at this time.
0 commit comments