You are here

function test23 in Coder 8.3.x

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

Void returns allowed when null is given in @return.

When null is a potential return value it should be allowed to have return statements with void return as well.

Return value

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

File

tests/Drupal/Commenting/FunctionCommentUnitTest.inc, line 271
Some function comment tests.

Code

function test23() {
  if (1 == 2) {
    return;
  }
  return TRUE;
}