TomasVotruba / bladestan

PHPStan analysis for Blade templates
https://tomasvotruba.com/blog/introducing-bladestan-phpstan-analysis-of-blade-templates/
MIT License
286 stars 13 forks source link

Add support for response()->view() #32

Closed joelclermont closed 1 year ago

joelclermont commented 1 year ago

I scanned a few of my current projects, and over 99% of the time I'm returning a view from a controller, I use the global view() helper, but that < 1% would be nice to cover too.

Sometimes if you need to set a response header or alter the status code, I'll use Response::view() or response()->view().

I'm contemplating standardizing on response()->view() since it returns a concrete Response type, whereas the global view helper returns a much larger union type.

TomasVotruba commented 1 year ago

Thanks for the suggestion :+1:

Could you add a new fixture with single minimal example here? https://github.com/TomasVotruba/bladestan/tree/main/tests/Rules/Fixture

TomasVotruba commented 1 year ago

Done in https://github.com/TomasVotruba/bladestan/pull/37