You are here

function foo in Coder 7.2

Same name in this branch
  1. 7.2 coder_sniffer/Test/bad/bad.php \foo()
  2. 7.2 coder_sniffer/Test/good/good.php \foo()
Same name and namespace in other branches
  1. 8.3 tests/Drupal/Commenting/TodoCommentUnitTest.inc \foo()
  2. 8.3 tests/Drupal/Commenting/FunctionCommentUnitTest.inc \foo()
  3. 8.3 tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.1.inc \foo()
  4. 8.3 tests/Drupal/Files/LineLengthUnitTest.inc \foo()
  5. 8.3 tests/Drupal/WhiteSpace/CommaUnitTest.inc \foo()
  6. 8.3 tests/Drupal/bad/bad.php \foo()
  7. 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \foo()
  8. 8.2 coder_sniffer/Drupal/Test/Files/LineLengthUnitTest.inc \foo()
  9. 8.2 coder_sniffer/Drupal/Test/WhiteSpace/CommaUnitTest.inc \foo()
  10. 8.2 coder_sniffer/Drupal/Test/bad/bad.php \foo()
  11. 8.2 coder_sniffer/Drupal/Test/good/good.php \foo()
  12. 8.3.x tests/Drupal/Commenting/TodoCommentUnitTest.inc \foo()
  13. 8.3.x tests/Drupal/Commenting/FunctionCommentUnitTest.inc \foo()
  14. 8.3.x tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.1.inc \foo()
  15. 8.3.x tests/Drupal/Files/LineLengthUnitTest.inc \foo()
  16. 8.3.x tests/Drupal/WhiteSpace/CommaUnitTest.inc \foo()
  17. 8.3.x tests/Drupal/bad/bad.php \foo()

Allowed switch() statement in a function without breaks.

2 calls to foo()
good.php in coder_sniffer/Test/good/good.php
This file contains all the valid notations for the drupal coding standard.
test21 in coder_sniffer/Test/bad/bad.php
Some indentation errors.
3 string references to 'foo'
bad.php in coder_sniffer/Test/bad/bad.php
Foo::__toString in coder_sniffer/Test/good/good.php
Returns the string representatuion of this object.
hook_upgrade_call_alter in coder_upgrade/coder_upgrade.api.php
Alters function calls using the grammar parser.

File

coder_sniffer/Test/good/good.php, line 219
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;
  }
}