function test23 in Coder 8.3.x
Same name in this branch
Same name and namespace in other branches
- 8.3 tests/Drupal/Commenting/FunctionCommentUnitTest.inc \test23()
- 8.3 tests/Drupal/bad/bad.php \test23()
- 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \test23()
- 8.2 coder_sniffer/Drupal/Test/bad/bad.php \test23()
- 8.2 coder_sniffer/Drupal/Test/good/good.php \test23()
- 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;
}