User tests: Successful: Unsuccessful:
Return is unnecessary as the last statement in a void method
Code review
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Title |
|
You don't need to return early within a if/elseif/elseif/else block if no code follow the block, as PHP will simply be returning without further processing in that method anyway.
These are all "Code Smell" as reported by phpStorm.
I have tested this item
Saw the code changes - seem OK. But in plugins/system/redirect/redirect.php the removed return is not the last statement in the method. It is the last statement in an if/elseif block.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-10-15 21:55:15 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
LGTM. Thanks!
In the catch blocks in plugins/system/redirect/redirect.php are 2 returns missing. Don't know if they are mean as "early return" at least they are unneeded.