Using #PHPStan, I've documented common errors you might encounter and how to fix them.
dcblog.dev/mastering-phpstan-common-errors-and-how-to-fix-them
•
Hi if you know #phpstan I need to ask you something.
I'm trying to introduce it on a project that runs github.com/roblesterjr04/EloquentSalesForce and because of a issue I have to get the first element of a query with ->get()->first() so basically performing an inefficient action on the collection.
Now running phpstan level 0 I get the error " Called 'first' on Laravel collection, but could have been retrieved as a query" everywhere. Is it possible to disable only that rule?
•
In response to @rmitesh
Up to Level 5 all checks are passed.
But in Level 6, facing this errors.
Any solution?
#PHPStan