vscode-intelephense
vscode-intelephense copied to clipboard
Annotate class member insed a function scope
Feature description or problem with existing feature
I am using CakePHP. When I work with a template file I am in a function like scope and have for example access to the form helper with $this->Form
Describe the solution you'd like I'd like to be able to annotate the type of Form. I tried it with
use Cake\View\Helper\FormHelper;
/** @var FormHelper $this->Form */
/** @property FormHelper $Form */
But none of them worked.
Does adding the below to the template file work?
/** @var \Cake\View\View $this **/
Yes that does the trick - thanks!