function foo in Coder 8.2
Same name in this branch
- 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \foo()
- 8.2 coder_sniffer/Drupal/Test/Files/LineLengthUnitTest.inc \foo()
- 8.2 coder_sniffer/Drupal/Test/WhiteSpace/CommaUnitTest.inc \foo()
- 8.2 coder_sniffer/Drupal/Test/bad/bad.php \foo()
- 8.2 coder_sniffer/Drupal/Test/good/good.php \foo()
Same name and namespace in other branches
- 8.3 tests/Drupal/Commenting/TodoCommentUnitTest.inc \foo()
- 8.3 tests/Drupal/Commenting/FunctionCommentUnitTest.inc \foo()
- 8.3 tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.1.inc \foo()
- 8.3 tests/Drupal/Files/LineLengthUnitTest.inc \foo()
- 8.3 tests/Drupal/WhiteSpace/CommaUnitTest.inc \foo()
- 8.3 tests/Drupal/bad/bad.php \foo()
- 7.2 coder_sniffer/Test/bad/bad.php \foo()
- 7.2 coder_sniffer/Test/good/good.php \foo()
- 8.3.x tests/Drupal/Commenting/TodoCommentUnitTest.inc \foo()
- 8.3.x tests/Drupal/Commenting/FunctionCommentUnitTest.inc \foo()
- 8.3.x tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.1.inc \foo()
- 8.3.x tests/Drupal/Files/LineLengthUnitTest.inc \foo()
- 8.3.x tests/Drupal/WhiteSpace/CommaUnitTest.inc \foo()
- 8.3.x tests/Drupal/bad/bad.php \foo()
Allowed switch() statement in a function without breaks.
6 calls to foo()
- CommaUnitTest.inc in coder_sniffer/
Drupal/ Test/ WhiteSpace/ CommaUnitTest.inc - CommentEmptyLineUnitTest.inc in coder_sniffer/
DrupalPractice/ Test/ Commenting/ CommentEmptyLineUnitTest.inc - Foo::test in coder_sniffer/
Drupal/ Test/ good/ good.php - PostStatementCommentUnitTest.inc in coder_sniffer/
Drupal/ Test/ Commenting/ PostStatementCommentUnitTest.inc - test21 in coder_sniffer/
Drupal/ Test/ bad/ bad.php - Some indentation errors.
6 string references to 'foo'
- bad.php in coder_sniffer/
Drupal/ Test/ bad/ bad.php - CheckPlainUnitTest.inc in coder_sniffer/
DrupalPractice/ Test/ FunctionCalls/ CheckPlainUnitTest.inc - Foo::__toString in coder_sniffer/
Drupal/ Test/ good/ good.php - Returns the string representatuion of this object.
- FunctionWatchdogUnitTest.inc in coder_sniffer/
Drupal/ Test/ Semantics/ FunctionWatchdogUnitTest.inc - test1 in coder_sniffer/
DrupalPractice/ Test/ good/ good.php - Ignoring the array value in a foreach loop is OK.
File
- coder_sniffer/
Drupal/ Test/ good/ good.php, line 487 - This file contains all the valid notations for the drupal coding standard.
Code
function foo() {
switch ($x) {
case 1:
return 5;
case 2:
return 6;
case 3:
return array(
'whiz',
'bang',
);
case 4:
return helper_func('whiz', 'bang');
default:
throw new Exception();
}
}