Skip to content

Commit

Permalink
use !is_numeric() check in before line error
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Oct 2, 2016
1 parent bb31219 commit 53021c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Reporter/Coverage/Exporter/Lcov.php
Expand Up @@ -76,13 +76,13 @@ protected static function _export($path, $tree, $coverage)
$fnCurr = null;

foreach ($tree->lines['content'] as $num => $content) {
if (is_string($num)) {
$num = 0;
}
$coverable = null;
foreach ($content['nodes'] as $node) {
if ($node->type === 'function' && $node->lines['start'] === $num) {
if ($node->isMethod || !$node->isClosure) {
if (!is_numeric($num)) {
$num = 0;
}
$result[] = 'FN:' . $num + 1 . ',' . $node->name;
$fnda[$node->name] = 0;
$fnf++;
Expand Down

0 comments on commit 53021c7

Please sign in to comment.