blade-formatter
blade-formatter copied to clipboard
Inconsistency in @unless directive
@foreach, @if and other directives have a space between the parameter parentheses.
Example @foreach ($users as $user) and @if ($user->isAdmin())
But @unless doesn't seem to have the same.
If we write @unless ($user->isAdmin()), it gets formatted to @unless($user->isAdmin())
Notice that it is missing a space that makes its style inconsistent with the rest of the directives.
Thank you.
Thanks @sanskar-mk2
Currently formatter using PSR-2 for formatting so it does not include space except for PHP built-in syntax like if or foreach.
But the official blade example code includes space so I think it's fine to include it at some point. This may be a Breaking Change and should be included in the Major version upgrade.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Fixed at https://github.com/shufo/blade-formatter/releases/tag/v1.32.11