Skip to content
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

Priority: array_indentation should run before no_whitespace_in_blank_line #3875

Closed
dmvdbrugge opened this issue Jul 5, 2018 · 1 comment
Closed
Labels

Comments

@dmvdbrugge
Copy link
Contributor

The PHP version you are using ($ php -v):

PHP 7.1.18 (cli) (built: May 25 2018 19:18:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.18, Copyright (c) 1999-2018, by Zend Technologies

PHP CS Fixer version you are using ($ php-cs-fixer -V):

PHP CS Fixer 2.12.1 Long Journey by Fabien Potencier and Dariusz Ruminski

The command you use to run PHP CS Fixer:

vendor/bin/php-cs-fixer fix -v --using-cache=no

The configuration file you are using, if any:

Basically the same as dmvdbrugge/dynamic-components, except explicit_string_variable, header_comment, no_alternative_syntax, and no_unset_on_property

If applicable, please provide minimum samples of PHP code (as plain text, not screenshots):

  • before running PHP CS Fixer (no changes):
$arr = [
    'a' => 'b',

//  'c' => 'd',
];
  • after first run:
--- Original
+++ New
@@ @@
 $arr = [
     'a' => 'b',
-
-//  'c' => 'd',
+    
+    //  'c' => 'd',
 ];
  • after second run:
--- Original
+++ New
@@ @@
 $arr = [
     'a' => 'b',
-    
+
     //  'c' => 'd',
 ];
  • expected:
    Immediately arrive at the last step

Meta: this is case 63 of #3844

@julienfalque
Copy link
Member

IMO not a priority issue but a bug in array_indentation which shouldn't indent empty lines.

SpacePossum added a commit that referenced this issue Jul 10, 2018
This PR was squashed before being merged into the 2.12 branch (closes #3887).

Discussion
----------

ArrayIndentFixer - Don't indent empty lines

This fixes #3875

Commits
-------

480fdcf ArrayIndentFixer - Don't indent empty lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants