PHP Development - return from method

Hi,

editor marks "return;" in method as bad code. According to php manual it
is legal to skip a method by writing "return;" especially for void methods.
Is there a possibility to configure this inspection?

Regards
Tilman

2 comments
Comment actions Permalink

Possibly your PHPDoc comment block for such function/method does state that function should return something hence the warning.

Please provide a reproducible code example of such function/method (together with related PHPDoc comment, if present) + IDE version.

P.S.
Using current PhpStorm EAP build PS-107.56: File | Settings | Inspections --> PHP | Probably bug | Inconsistent return points

0
Comment actions Permalink

Hello Tilman,

Looks like your issue was fixed. See - http://youtrack.jetbrains.net/issue/WI-6215

Thanks for feedback!

0

Please sign in to leave a comment.