Php-cs-fixer: Priority: array_indentation should run before no_whitespace_in_blank_line

Created on 5 Jul 2018  ·  1Comment  ·  Source: FriendsOfPHP/PHP-CS-Fixer

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

kinbug

Most helpful comment

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

>All comments

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

Was this page helpful?
0 / 5 - 0 ratings