PHP Classes

File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml

Recommend this page to a friend!
  Classes of Simo   CodeIgniter Plugin for Z-Ray   zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml   Download  
File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CodeIgniter Plugin for Z-Ray
Show CodeIgniter application information in Z-Ray
Author: By
Last change:
Date: 2 years ago
Size: 1,370 bytes
 

Contents

Class file image Download
<documentation title="For Loop Declarations"> <standard> <![CDATA[ In a for loop declaration, there should be no space inside the brackets and there should be 0 spaces before and 1 space after semicolons. ]]> </standard> <code_comparison> <code title="Valid: Correct spacing used."> <![CDATA[ for (<em></em>$i = 0; $i < 10; $i++<em></em>) { echo $i; } ]]> </code> <code title="Invalid: Invalid spacing used inside brackets."> <![CDATA[ for (<em> </em>$i = 0; $i < 10; $i++<em> </em>) { echo $i; } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Correct spacing used."> <![CDATA[ for ($i = 0<em></em>; $i < 10<em></em>; $i++) { echo $i; } ]]> </code> <code title="Invalid: Invalid spacing used before semicolons."> <![CDATA[ for ($i = 0<em> </em>; $i < 10<em> </em>; $i++) { echo $i; } ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Correct spacing used."> <![CDATA[ for ($i = 0;<em> </em>$i < 10;<em> </em>$i++) { echo $i; } ]]> </code> <code title="Invalid: Invalid spacing used after semicolons."> <![CDATA[ for ($i = 0;<em></em>$i < 10;<em></em>$i++) { echo $i; } ]]> </code> </code_comparison> </documentation>