Skip to content

Commit

Permalink
fix: SensioInsight reported use of a function in loops - fixes #56
Browse files Browse the repository at this point in the history
  • Loading branch information
ousamabenyounes committed Oct 15, 2016
1 parent 8cfd7d4 commit 9ce8eb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/LogParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,12 @@ public function parse()
{
$hosts = $this->getHosts();
$file = $this->getSplFileObject();
$numberOfLine = $this->getNumberOfLine();
foreach ($hosts as $host) {
$testConfiguration = $this->getTestConfiguration();
$testConfiguration[$host] = (!isset($testConfiguration[$host]) ? [] : $testConfiguration[$host]);
$this->setTestConfiguration($testConfiguration);
for ($i = 0; $i < $this->getNumberOfLine(); $i++) {
for ($i = 0; $i < $numberOfLine; $i++) {
$line = $file->current();
if ('' !== trim($line)) {
$this->parseOneLine($line);
Expand Down

0 comments on commit 9ce8eb5

Please sign in to comment.