aboutsummaryrefslogtreecommitdiffstats
path: root/includes/diff/DairikiDiff.php
diff options
context:
space:
mode:
authorSam Reed <reedy@users.mediawiki.org>2011-10-29 02:04:27 +0000
committerSam Reed <reedy@users.mediawiki.org>2011-10-29 02:04:27 +0000
commitc8e89896f7268e7464e96c412e24a04196f9a39f (patch)
tree71f0c74f4ddabf3c53816ceb4342e92e5edd7d69 /includes/diff/DairikiDiff.php
parenta96d4be4a4c50ff72d0a5e5748a335328d9ea6ac (diff)
downloadmediawikicore-c8e89896f7268e7464e96c412e24a04196f9a39f.tar.gz
mediawikicore-c8e89896f7268e7464e96c412e24a04196f9a39f.zip
Remove more assignments in conditionals (while each to foreach)
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/101244
Diffstat (limited to 'includes/diff/DairikiDiff.php')
-rw-r--r--includes/diff/DairikiDiff.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php
index c935eee284eb..7f618fc8a89c 100644
--- a/includes/diff/DairikiDiff.php
+++ b/includes/diff/DairikiDiff.php
@@ -371,7 +371,7 @@ class _DiffEngine {
}
$matches = $ymatches[$line];
reset( $matches );
- while ( list( , $y ) = each( $matches ) ) {
+ foreach ( $matches as $y ) {
if ( empty( $this->in_seq[$y] ) ) {
$k = $this->_lcs_pos( $y );
assert( $k > 0 );
@@ -379,7 +379,7 @@ class _DiffEngine {
break;
}
}
- while ( list ( , $y ) = each( $matches ) ) {
+ foreach ( $matches as $y ) {
if ( $y > $this->seq[$k -1] ) {
assert( $y < $this->seq[$k] );
// Optimization: this is a common case:
@@ -493,7 +493,7 @@ class _DiffEngine {
// Use the partitions to split this problem into subproblems.
reset( $seps );
$pt1 = $seps[0];
- while ( $pt2 = next( $seps ) ) {
+ foreach ( $seps as $pt2 ) {
$this->_compareseq ( $pt1[0], $pt2[0], $pt1[1], $pt2[1] );
$pt1 = $pt2;
}