You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, using this package to insert Blade directives added directives without any spaces (i.e. @foreach($foo as $bar), @if($foo) etc. Now, directives contain spaces between the directive name and the opening parenthesis, i.e. @foreach ($foo as $bar), @if ($foo) etc. This means I know have code that is non-uniform.
What was the reason for this change? I preferred the non-space version for consistency, as you write @section('section.name') not @section ('section.name') and @include('path.to.include') not @include ('path.to.include').
The text was updated successfully, but these errors were encountered:
The uniformity is dependant on the way you look at it. My main argument is going to be that it's the way how it is depicted in Laravel documentation. As a secondary, if you write your PHP adhering to PSR-2, then all control structures have a space between the directive name and opening parenthesis. Rest of directives can be viewed as functions with exceptions such as @section.
I would have no problems with it being configurable in package settings where you can just tick a checkbox to toggle the style you like. I am not sure however if snippets package allows one to do this programmatically.
@Ingramz Understandable. But my argument re: PSR-2 is that Blade directives aren’t really PHP, so doesn’t really need to adhere to that standard.
I’d definitely be interested in a configuration option. I think some packages allow configuring of HTML- or XHTML-style tags, so would imagine it is possible. I have no idea how it would be achieved off the top of my head, though 😄
Previously, using this package to insert Blade directives added directives without any spaces (i.e.
@foreach($foo as $bar)
,@if($foo)
etc. Now, directives contain spaces between the directive name and the opening parenthesis, i.e.@foreach ($foo as $bar)
,@if ($foo)
etc. This means I know have code that is non-uniform.What was the reason for this change? I preferred the non-space version for consistency, as you write
@section('section.name')
not@section ('section.name')
and@include('path.to.include')
not@include ('path.to.include')
.The text was updated successfully, but these errors were encountered: