Doc Blocks - do not populate parameter/return type fields if they are already typed

Is there a way to have PHPStorm not add redundant parameters/return types in doc blocks?

For example, if there's a function declaration like this:

/**
* @param int $a
* @param string $b
* @return int
*/
function myFunction(int $a, string $b): int
{
return 0;
}


All of the doc block attributes are redundant, as the types are already specified in the original function declaration. I'm guessing it's a setting somewhere that I can toggle?

1 comment
Comment actions Permalink

Unfortunately, there isn't such a way. Here's a request for that: https://youtrack.jetbrains.com/issue/WI-38844/Add-option-to-not-auto-generate-redundant-docblocks
Please vote for it to get notified when there's any progress.

0

Please sign in to leave a comment.