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

View variables are not recognized if stored in a variable #33

Closed AJenbo closed 1 year ago

AJenbo commented 1 year ago

The following will fail

$items = ['item'];
$compat = compact('items');
return view('newsletters.edit-new-segmented', $compat);

But this will pass

$items = ['item'];
return view('newsletters.edit-new-segmented', compact('items'));

@TomasVotruba I expect to start adding test cases next week, so no need to mention it again :)

AJenbo commented 1 year ago

I'm unable to replicate this error, so I guess it was solved already.

TomasVotruba commented 1 year ago

Thank you

AJenbo commented 1 year ago

Hope you saw https://github.com/TomasVotruba/bladestan/pull/49 as well, it's the last fix I need before i can continue on to level 1 :sweat_smile:

Once that is done I will work on getting our other project working with Bladestan. That one is running level 4 and the following blade files:

Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Blade                          358           1644             70          13584