8000 Fixed off-by-one error when getting last line of code block (#26) · symfony-tools/code-block-checker@0c450ba · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c450ba

Browse files
authored
Fixed off-by-one error when getting last line of code block (#26)
1 parent 5ada786 commit 0c450ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Service/CodeNodeRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private function warmupCache(CodeNode $node, IssueCollection $issues, string $ap
6262
}
6363
}
6464

65-
$issues->addIssue(new Issue($node, trim($error), 'Cache 5229 Warmup', $node->getEnvironment()->getCurrentFileName(), count(explode(PHP_EOL, $node->getValue()))));
65+
$issues->addIssue(new Issue($node, trim($error), 'Cache Warmup', $node->getEnvironment()->getCurrentFileName(), count(explode(PHP_EOL, $node->getValue())) - 1));
6666
}
6767

6868
private function getFile(CodeNode $node): string

0 commit comments

Comments
 (0)
0