Replace foreachs with for loops
This commit is contained in:
parent
c16b9aa6f0
commit
c7d9f00965
@ -127,9 +127,9 @@ class Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update the syntax highlighting for all the rows of the file
|
// Update the syntax highlighting for all the rows of the file
|
||||||
foreach ($this->rows as $row)
|
for ($i = 0; $i < $this->numRows; $i++)
|
||||||
{
|
{
|
||||||
$row->updateSyntax();
|
$this->rows[$i]->updateSyntax();
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -926,9 +926,9 @@ class Editor {
|
|||||||
private function refreshPHPSyntax(): void
|
private function refreshPHPSyntax(): void
|
||||||
{
|
{
|
||||||
$this->syntax->tokens = get_php_tokens($this->rowsToString());
|
$this->syntax->tokens = get_php_tokens($this->rowsToString());
|
||||||
foreach($this->rows as $row)
|
for ($i = 0; $i < $this->numRows; $i++)
|
||||||
{
|
{
|
||||||
$row->updateSyntax();
|
$this->rows[$i]->updateSyntax();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user