Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type of $this gets mangled when passed as a variable to blade #90

Open
AJenbo opened this issue Oct 30, 2023 · 0 comments
Open

Type of $this gets mangled when passed as a variable to blade #90

AJenbo opened this issue Oct 30, 2023 · 0 comments

Comments

@AJenbo
Copy link
Contributor

AJenbo commented Oct 30, 2023

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 */
robchett added a commit to robchett/bladestan that referenced this issue Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant