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

Fix whitespace error #49

Closed AJenbo closed 1 year ago

AJenbo commented 1 year ago

Fixes #42

The issue here was that the if no PHP was gathered from the template then it would not add a php opening tag but still join a line break which looks improper to PHPStan. So now we simply always add the opening tag, not adding it was probably an unnecessary optimization anyway.

With this the project I work on is now able to parse with out any errors on level 0 :tada:

Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Blade                          552           4243           1837          63784
AJenbo commented 1 year ago

Added a bit more description.

TomasVotruba commented 1 year ago

Thanks a lot 🤗