Method stub templates

Hey! I wonder if it is possible to edit templates used for stubbing methods? I dont want phpstorm to add #[\Override] attribute when I use ‘Add method stubs’ on class which implements interface.

0

Hi,
You can find most templates under “Settings/Preferences | Editor | File and Code Templates > Code”. However, I do not recall PhpStorm adding any attributes on “Add method stubs” quick-fix. 

0

Yeah, it was the first place I checked, but didnt find it there. Also checked live templates without luck. Maybe there is a way to configure if attributes should be used at all? 

0

Thank you for your reply.

Unfortunately, there is no known way to control this behaviour and I may also reproduce it (forgot to switch the language level before). I have submitted a corresponding feature request for you:
https://youtrack.jetbrains.com/issue/WI-75876/Add-method-stubs-Add-an-option-to-avoid-Override

If you have anything to add in comments, you are welcome!

0

请先登录再写评论。