Fork me on GitHub
a Sensio Labs Product

BoY42 (v3.15.1) edition

Rule no_useless_return

There should not be an empty return statement at the end of a function.


Example #1

--- Original
+++ New
 function example($b) {
     if ($b) {
-    return;

Rule sets

The rule is part of the following rule set:


Using the @PhpCsFixer rule set will enable the no_useless_return rule.

The logo is © 2010-2022 Sensio Labs