Change-Id: I07b4043163e5d00709f72dbbb3e2a46b17414d1c
// 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;
<exclude name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix"/>
<exclude name="MediaWiki.WhiteSpace.SpaceyParenthesis.SingleSpaceBeforeCloseParenthesis"/>
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
- <exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed"/>
<exclude name="MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
<exclude name="Squiz.WhiteSpace.SemicolonSpacing.Incorrect"/>