Skip to content

Commit

Permalink
A never-returning function must not return
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Jun 7, 2022
1 parent 33cb226 commit e575d2b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private function renderMethodBody($method, $config)

$body .= "\$ret = {$invoke}(__FUNCTION__, \$argv);\n";

if ($method->getReturnType() !== "void") {
if (! in_array($method->getReturnType(), ['never','void'], true)) {
$body .= "return \$ret;\n";
}

Expand Down

0 comments on commit e575d2b

Please sign in to comment.