PATH:
opt
/
cpanel
/
ea-wappspector
/
vendor
/
squizlabs
/
php_codesniffer
/
src
/
Standards
/
Squiz
/
Tests
/
Commenting
function long_function() { if (longFunction) { // This is a long // IF statement // that does // not have // an ELSE // block on it variable = 'hello'; if (variable === 'hello') { // This is a short // IF statement } if (variable === 'hello') { // This is a short // IF statement } else { // This is a short ELSE // statement } }//end if if (longFunction) { // This is a long // IF statement // that does // not have // an ELSE // block on it variable = 'hello'; if (variable === 'hello') { // This is a short // IF statement } if (variable === 'hello') { // This is a short // IF statement } else { // This is a short ELSE // statement } } if (longFunction) { // This is a long // IF statement // that does // not have // an ELSE // block on it variable = 'hello'; if (variable === 'hello') { // This is a short // IF statement } if (variable === 'hello') { // This is a short // IF statement } else { // This is a short ELSE // statement } } else { // Short ELSE }//end if if (longFunction) { // This is a long // IF statement // that does // not have // an ELSE // block on it variable = 'hello'; if (variable === 'hello') { // This is a short // IF statement } if (variable === 'hello') { // This is a short // IF statement } else { // This is a short ELSE // statement } } else { // Short ELSE } } for (variable=1; variable < 20; variable++) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 }//end for for (variable=1; variable < 20; variable++) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 for (val =1; val < 20; val++) { // Short for. } // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 } while (variable < 20) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 }//end while while (variable < 20) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 while (something) { // Short while. } // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 } if (longFunction) { // This is a long // IF statement // that does // not have // an ELSE // block on it variable = 'hello'; if (variable === 'hello') { // This is a short // IF statement } if (variable === 'hello') { // This is a short // IF statement } else { // This is a short ELSE // statement } } //end if if (longFunction) { // This is a long // IF statement // that does // not have // an ELSE // block on it variable = 'hello'; if (variable === 'hello') { // This is a short // IF statement } if (variable === 'hello') { // This is a short // IF statement } else { // This is a short ELSE // statement } } else { // Short ELSE } //end if for (variable=1; variable < 20; variable++) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 } //end for while (variable < 20) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 } //end while while (variable < 20) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 }//end for if (true) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 } else if (condition) { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 } else { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 }//end if if (something) { // Line 1 // Line 2 } else if (somethingElse) { // Line 1 // Line 2 } else { // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 // Line 6 // Line 7 // Line 8 // Line 9 // Line 10 // Line 11 // Line 12 // Line 13 // Line 14 // Line 15 // Line 16 // Line 17 // Line 18 // Line 19 // Line 20 } switch (something) { case '1': // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 break; case '2': // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 break; case '3': // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 break; case '4': // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 break; case '5': // Line 1 // Line 2 // Line 3 // Line 4 // Line 5 break; } // Wrong comment if (condition) { condition = true; }//end foreach
[-] ClosingDeclarationCommentUnitTest.4.inc.fixed
[edit]
[-] LongConditionClosingCommentUnitTest.js
[edit]
[-] ClosingDeclarationCommentUnitTest.1.inc.fixed
[edit]
[-] FileCommentUnitTest.9.inc
[edit]
[-] VariableCommentUnitTest.php
[edit]
[-] FunctionCommentThrowTagUnitTest.inc
[edit]
[-] LongConditionClosingCommentUnitTest.php
[edit]
[-] FileCommentUnitTest.1.inc.fixed
[edit]
[-] PostStatementCommentUnitTest.1.js
[edit]
[-] LongConditionClosingCommentUnitTest.inc
[edit]
[-] BlockCommentUnitTest.inc.fixed
[edit]
[-] FileCommentUnitTest.1.js.fixed
[edit]
[-] DocCommentAlignmentUnitTest.js.fixed
[edit]
[+]
..
[-] FileCommentUnitTest.2.js
[edit]
[-] ClosingDeclarationCommentUnitTest.5.inc.fixed
[edit]
[-] FileCommentUnitTest.6.inc
[edit]
[-] BlockCommentUnitTest.inc
[edit]
[-] PostStatementCommentUnitTest.1.js.fixed
[edit]
[-] FunctionCommentUnitTest.inc.fixed
[edit]
[-] FileCommentUnitTest.2.inc
[edit]
[-] FileCommentUnitTest.5.inc
[edit]
[-] ClosingDeclarationCommentUnitTest.1.inc
[edit]
[-] FileCommentUnitTest.1.inc
[edit]
[-] FunctionCommentUnitTest.inc
[edit]
[-] InlineCommentUnitTest.js
[edit]
[-] ClosingDeclarationCommentUnitTest.3.inc
[edit]
[-] VariableCommentUnitTest.inc.fixed
[edit]
[-] FunctionCommentUnitTest.php
[edit]
[-] ClosingDeclarationCommentUnitTest.5.inc
[edit]
[-] EmptyCatchCommentUnitTest.php
[edit]
[-] FunctionCommentThrowTagUnitTest.php
[edit]
[-] FileCommentUnitTest.10.inc
[edit]
[-] FileCommentUnitTest.3.inc
[edit]
[-] ClassCommentUnitTest.inc
[edit]
[-] FileCommentUnitTest.4.inc
[edit]
[-] ClosingDeclarationCommentUnitTest.4.inc
[edit]
[-] LongConditionClosingCommentUnitTest.inc.fixed
[edit]
[-] PostStatementCommentUnitTest.2.js
[edit]
[-] EmptyCatchCommentUnitTest.inc
[edit]
[-] InlineCommentUnitTest.js.fixed
[edit]
[-] FileCommentUnitTest.8.inc
[edit]
[-] InlineCommentUnitTest.inc.fixed
[edit]
[-] PostStatementCommentUnitTest.inc
[edit]
[-] BlockCommentUnitTest.php
[edit]
[-] DocCommentAlignmentUnitTest.js
[edit]
[-] PostStatementCommentUnitTest.php
[edit]
[-] ClosingDeclarationCommentUnitTest.php
[edit]
[-] VariableCommentUnitTest.inc
[edit]
[-] FileCommentUnitTest.7.inc
[edit]
[-] FileCommentUnitTest.1.js
[edit]
[-] InlineCommentUnitTest.inc
[edit]
[-] ClassCommentUnitTest.php
[edit]
[-] ClosingDeclarationCommentUnitTest.2.inc
[edit]
[-] DocCommentAlignmentUnitTest.php
[edit]
[-] DocCommentAlignmentUnitTest.inc.fixed
[edit]
[-] FileCommentUnitTest.php
[edit]
[-] LongConditionClosingCommentUnitTest.js.fixed
[edit]
[-] InlineCommentUnitTest.php
[edit]
[-] PostStatementCommentUnitTest.inc.fixed
[edit]
[-] DocCommentAlignmentUnitTest.inc
[edit]