Skip to content

Commit

Permalink
Closes #126.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Oct 15, 2012
1 parent f69e9cf commit 85a00f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.markdown
Expand Up @@ -3,6 +3,10 @@ PHP_CodeCoverage 1.2

This is the list of changes for the PHP_CodeCoverage 1.2 release series.

PHP_CodeCoverage 1.2.6
----------------------
* Fixed #126: `E_NOTICE` thrown when generating coverage report.

PHP_CodeCoverage 1.2.5
----------------------
* Fixed regression introduced in PHP_CodeCoverage 1.2.4.
Expand Down
13 changes: 7 additions & 6 deletions PHP/CodeCoverage/Util.php
Expand Up @@ -121,13 +121,14 @@ public static function getLinesToBeIgnored($filename, $cacheTokens = TRUE)
self::$ignoredLines[$filename][$i] = TRUE;
}

// Workaround for the fact the DOC_COMMENT token does
// not include the final \n character in its text.
if (substr(trim($lines[$i-1]), -2) == '*/') {
self::$ignoredLines[$filename][$i] = TRUE;
}
if ($token instanceof PHP_Token_DOC_COMMENT) {
// Workaround for the fact the DOC_COMMENT token
// does not include the final \n character in its
// text.
if (substr(trim($lines[$i-1]), -2) == '*/') {
self::$ignoredLines[$filename][$i] = TRUE;
}

if (!$token instanceof PHP_Token_COMMENT) {
break;
}

Expand Down

0 comments on commit 85a00f3

Please sign in to comment.