I'm using PHPStorm and trying to figure out how to make it stop squawking when a __construct()
has @return void
in its PHPDocs...
According the PHPDocs, void
is valid, or the @return
may be omitted. That being said, is there a way to fix this or is it a bug?
Unfortunately you can not turn off just this one very specific inspection. The whole PHPDoc method signature inspection would need to be turned off. Fortunately you can set the scope of the inspection to be only your own project code, ignoring 3rd party libraries and frameworks. See the scopes dropdown on the right under the description.
Also on a case-by-case basis you can turn off the inspection above each PHPDoc comment:
/** @noinspection PhpDocSignatureInspection */
/**
* @return void
*/
public function __construct() ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With