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

How to handle PHPStan analysis #41

Open
ejntaylor opened this issue Jun 9, 2023 · 1 comment
Open

How to handle PHPStan analysis #41

ejntaylor opened this issue Jun 9, 2023 · 1 comment

Comments

@ejntaylor
Copy link

Using PHPStan with FlexiblePresenter and getting:

Access to an undefined property App\Presenters\UserPresenter::$id.

Wondering how best to handle this and should we be explicitly defining properties within the presenter class?

@peterthomson
Copy link

For now we've been just excluding the presenters from static analysis. But I think there's a solution somewhere in the resource pattern (which is first-party laravel), from what I can tell it's a mixin / docblock / attribute to declare what the $this is in a particular presenter.

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

2 participants