--level used: maxThis at least on Laravel 5.7.1. False positive I assume.
return response()->json(['message' => 'foobar']);
@lasselehtinen This issue got addressed on the version v0.2.11. Can you test it?
This improved usage of response() significantly for me, but I then ran into a problem with the phpdoc of Lumen's ResponseFactory::json() being incorrect. :)
I have submitted https://github.com/laravel/lumen-framework/pull/811
For future reference the commit was https://github.com/nunomaduro/larastan/commit/a434de96df8d15fea85f8e2240265d2c191bcd90
Most helpful comment
This improved usage of response() significantly for me, but I then ran into a problem with the phpdoc of Lumen's ResponseFactory::json() being incorrect. :)
I have submitted https://github.com/laravel/lumen-framework/pull/811