laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.

Home Page:https://laravel.com/docs/pint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`if/else` statement spacing

jacoblockard99 opened this issue · comments

Currently, Laravel Pint converts this:

<?php

if($something) {
  // ...
}

to:

<?php

if ($something) {
  // ...
}

It appears that it is the braces rule that changes this, which is odd.

Is there any way to either disable this functionality, or better yet make Laravel Pint actually fix to the first one?

You can disable / configure rules as detailed here: https://github.com/laravel/pint#rules.

Yes, I understand that.

However, it seems odd that the braces rule should control spacing around an if condition. Moreover, I would like to be able to set the first option as the correct option, not disable fixing it altogether.

Any ideas?