Skip to content

Shift binary alignment to align_single_space_minimal #4801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

paulbalandan
Copy link
Member

Description
This shifts the strategy for binary operator alignment to align_single_space_minimal from the original align_single_space. The minimal version ensures there's a single space on both sides of the operator and there is no ridiculous alignment.

// align_single_space
-$foo = 'bar';
+$foo    = 'bar';
 $bar    = 'baz';

// align_single_space_minimal
 $foo = 'bar';
-$bar    = 'baz';
+$bar = 'baz';

Checklist:

  • Securely signed commits

@paulbalandan paulbalandan requested a review from MGatner June 9, 2021 07:40
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES! this is much better. Also very glad to see that this will once again allow for single-line nested arrays (like admin/module/tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php)

@paulbalandan paulbalandan force-pushed the align-single-space-minimal branch from 8a99b72 to 5333844 Compare June 9, 2021 16:36
@paulbalandan paulbalandan merged commit 5c5cfae into codeigniter4:develop Jun 9, 2021
@paulbalandan paulbalandan deleted the align-single-space-minimal branch June 9, 2021 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants