Frage

My 'problem' is rather simple but I haven't been able to figure it out - is there a way to make PHPStorm offer "$this->" as an autocomplete option when I start typing "$th" instead of offering "$this" (without the arrow) ? Is there maybe some other solution to this which I don't know about?

War es hilfreich?

Lösung

You cannot use the autocomplete feature because it does not know beforehand if youre typing '$this' as a function parameter, as a return variable or whatever situation you need it for. The autocomplete will loop the variables available in your current scope - and 'this' is allways within closure of a class function.

As LazyOne states, use a custom template instead, see:

http://www.jetbrains.com/phpstorm/webhelp/creating-and-editing-template-variables.html

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top