How to disable parameter hints for constructors only?


How do you disable parameter hints for constructors only? Mostly to reduce the new File([pathname]"path") noise.

Tried adding exclusions for "" and "*)" and those didn't work.

Might also be worth adding log4j Logger and Category to the default exclusions.

Comment actions Permalink should work.

You don't have to type it manually, Alt+Enter, Do not show hints for current method:

Comment actions Permalink

Didn't know that one thanks.

Looking at our codebase could also do with a stoplist of exclusions to avoid hinting: single chars, 'parameter[s]', 'param[s|0..9]', 'arg[s]', 'option[s]', 'value[s]', 'item[s]' ...

Comment actions Permalink

Tested in PhpStorm2017.1

1. Open Settings

2. Type parameter name hints in search box

3. Click Appearance, uncheck "Show parameter name hints" to hide all hints

4. Click Configure to configure specific methods only. When you click it, you get another window "Configure Parameter Name Hints". 

5. In Configure Parameter Name Hints place cursor to the last line and enter your method. e.g. __construct(*) to hide hints for constructors in PHP


Happy PHPStorming :)

- Samundra


Please sign in to leave a comment.