From: Reedy Date: Sat, 26 Sep 2015 16:45:29 +0000 (+0100) Subject: Re-enable Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed X-Git-Tag: 1.31.0-rc.0~9796^2 X-Git-Url: http://git.cyclocoop.org//%27http:/jquery.khurshid.com/ifixpng.php/%27?a=commitdiff_plain;h=355e58da2f6c4dc94fbbcd47e96943dbae08257a;p=lhc%2Fweb%2Fwiklou.git Re-enable Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed Change-Id: I07b4043163e5d00709f72dbbb3e2a46b17414d1c --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index d53797bc51..7743384dd0 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -206,7 +206,8 @@ abstract class ApiBase extends ContextSource { // Fix up the ugly "even numbered elements are description, odd // numbered elemts are the link" format (see doc for self::getExamples) $tmp = array(); - for ( $i = 0; $i < count( $examples ); $i += 2 ) { + $examplesCount = count( $examples ); + for ( $i = 0; $i < $examplesCount; $i += 2 ) { $tmp[$examples[$i + 1]] = $examples[$i]; } $examples = $tmp; diff --git a/phpcs.xml b/phpcs.xml index d1453e3f9e..df0f1fb3bf 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -7,7 +7,6 @@ -