You are here

function test24 in Coder 8.2

Same name in this branch
  1. 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \test24()
  2. 8.2 coder_sniffer/Drupal/Test/bad/bad.php \test24()
Same name and namespace in other branches
  1. 8.3 tests/Drupal/Commenting/FunctionCommentUnitTest.inc \test24()
  2. 8.3 tests/Drupal/bad/bad.php \test24()
  3. 7.2 coder_sniffer/Test/bad/bad.php \test24()
  4. 8.3.x tests/Drupal/Commenting/FunctionCommentUnitTest.inc \test24()
  5. 8.3.x tests/Drupal/bad/bad.php \test24()

Even when null is given in

Return value

there must be at least 1 valid return.

When null is a potential return value it should be allowed to have return statements with void return. This does not mean that all returns can be void. There must be at least one non-void return.

bool|null This implies that the return value can be NULL, a boolean, or empty.

File

coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc, line 288
Some function comment tests.

Code

function test24() {
  if (1 == 2) {
    return;
  }
  return;
}