You are here

function foo in Coder 8.2

Same name in this branch
  1. 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \foo()
  2. 8.2 coder_sniffer/Drupal/Test/Files/LineLengthUnitTest.inc \foo()
  3. 8.2 coder_sniffer/Drupal/Test/WhiteSpace/CommaUnitTest.inc \foo()
  4. 8.2 coder_sniffer/Drupal/Test/bad/bad.php \foo()
  5. 8.2 coder_sniffer/Drupal/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. 7.2 coder_sniffer/Test/bad/bad.php \foo()
  8. 7.2 coder_sniffer/Test/good/good.php \foo()
  9. 8.3.x tests/Drupal/Commenting/TodoCommentUnitTest.inc \foo()
  10. 8.3.x tests/Drupal/Commenting/FunctionCommentUnitTest.inc \foo()
  11. 8.3.x tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.1.inc \foo()
  12. 8.3.x tests/Drupal/Files/LineLengthUnitTest.inc \foo()
  13. 8.3.x tests/Drupal/WhiteSpace/CommaUnitTest.inc \foo()
  14. 8.3.x tests/Drupal/bad/bad.php \foo()

Short description

We use doxygen style comments. What's sad because eclipse PDT and PEAR CodeSniffer base on phpDoc comment style. Makes working with drupal not easier :|

Parameters

$field1: Doxygen style comments

$field2: Doxygen style comments

$field3: Doxygen style comments

Return value

Doxygen style comments

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.

... See full list

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.

... See full list

File

coder_sniffer/Drupal/Test/bad/bad.php, line 316

Code

function foo($field1, $field2, $field3 = NULL) {
  $system["description"] = t("This module inserts funny text into posts randomly.");

  /**
   * Inline doc blocks are not allowed.
   */
  return $system[$field];
}