bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.61k stars 94 forks source link

Intelephense IDE Helper. #2836

Closed cristian-home closed 6 months ago

cristian-home commented 6 months ago

I have a views folder that consists of .php files. The code is PHP embedded in HTML, so there are no classes or namespaces. These files will be required by a custom template engine, and they will make use of the $this variable. Is there a way to tell Intelephense what the type of $this is in all the files in this folder without having to manually add /** @var Class $this */ in each file?

bmewburn commented 6 months ago

There's not a global way of doing this and it's not on the roadmap.