Type of $this gets mangled when passed as a variable to blade
AJenbo opened this issue · comments
If in a component you use the following to pass the component model to the blade template:
view('my-template', ['model' => $this]);
The analyzed PHP code will looks like this:
/** @var $this(App\View\Components\MyForm) $model */
Thisisn't valid an will generate errors and warnings in PHPStan, instead the correctly generated phpDoc should look like this:
/** @var App\View\Components\MyForm $model */