mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Replace each() with foreach()
This commit is contained in:
parent
7d10c27346
commit
8e4a1ba8fa
4
thirdparty/difflib/difflib.php
vendored
4
thirdparty/difflib/difflib.php
vendored
@ -283,14 +283,14 @@ class DiffEngine
|
|||||||
continue;
|
continue;
|
||||||
$matches = $ymatches[$line];
|
$matches = $ymatches[$line];
|
||||||
reset($matches);
|
reset($matches);
|
||||||
while (list ($junk, $y) = each($matches))
|
foreach ($matches as $y)
|
||||||
if (empty($this->in_seq[$y])) {
|
if (empty($this->in_seq[$y])) {
|
||||||
$k = $this->lcs_pos($y);
|
$k = $this->lcs_pos($y);
|
||||||
assert($k > 0);
|
assert($k > 0);
|
||||||
$ymids[$k] = $ymids[$k - 1];
|
$ymids[$k] = $ymids[$k - 1];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
while (list ($junk, $y) = each($matches)) {
|
foreach ($matches as $y) {
|
||||||
if ($y > $this->seq[$k - 1]) {
|
if ($y > $this->seq[$k - 1]) {
|
||||||
assert($y < $this->seq[$k]);
|
assert($y < $this->seq[$k]);
|
||||||
// Optimization: this is a common case:
|
// Optimization: this is a common case:
|
||||||
|
Loading…
Reference in New Issue
Block a user