feature #4024 added a `list-files` command

by @clxmstaab

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/FriendsOfPHP/PHP-CS-Fixer/5390/78eaee314fb708859624366f2e4cce8970deb04a/cs.diff | patch -p0
diff -ru src/Console/Command/ListFilesCommand.php src/Console/Command/ListFilesCommand.php
--- src/Console/Command/ListFilesCommand.php	2021-01-24 21:34:00.635157489 +0000
+++ src/Console/Command/ListFilesCommand.php	2021-01-24 21:34:01.842116674 +0000
@@ -31,7 +31,6 @@
 {
     protected static $defaultName = 'list-files';
 
-
     /**
      * @var ConfigInterface
      */
diff -ru tests/Console/Command/ListFilesCommandTest.php tests/Console/Command/ListFilesCommandTest.php
--- tests/Console/Command/ListFilesCommandTest.php	2021-01-24 21:34:00.891148832 +0000
+++ tests/Console/Command/ListFilesCommandTest.php	2021-01-24 21:34:01.863115964 +0000
@@ -28,9 +28,9 @@
     public function testListWithConfig()
     {
         $commandTester = $this->doTestExecute([
-            '--config' => __DIR__.'/test-project/.php_cs'
+            '--config' => __DIR__.'/test-project/.php_cs',
         ]);
-        $this->assertSame(escapeshellarg('needs-fixing.php').PHP_EOL, $commandTester->getDisplay());
+        static::assertSame(escapeshellarg('needs-fixing.php').PHP_EOL, $commandTester->getDisplay());
     }
 
     /**
diff -ru tests/Console/Command/test-project/needs-fixing.php tests/Console/Command/test-project/needs-fixing.php
--- tests/Console/Command/test-project/needs-fixing.php	2021-01-24 21:34:01.354133176 +0000
+++ tests/Console/Command/test-project/needs-fixing.php	2021-01-24 21:34:01.865115896 +0000
@@ -1,8 +1,19 @@
 <?php
 
-function abc() {}
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *     Dariusz RumiƄski <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
 
-function def()
+function abc()
 {
+}
 
+function def()
+{
 }

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/FriendsOfPHP/PHP-CS-Fixer/5390/78eaee314fb708859624366f2e4cce8970deb04a/typos.diff | patch -p0
diff -ru src/Console/Command/ListFilesCommand.php src/Console/Command/ListFilesCommand.php
--- src/Console/Command/ListFilesCommand.php	2021-01-24 21:34:00.635157489 +0000
+++ src/Console/Command/ListFilesCommand.php	2021-01-24 21:34:01.997111433 +0000
@@ -61,7 +61,7 @@
                     new InputOption('config', '', InputOption::VALUE_REQUIRED, 'The path to a .php_cs file.'),
                 ]
             )
-            ->setDescription('List all files beeing fixed by the given config.')
+            ->setDescription('List all files being fixed by the given config.')
         ;
     }
 

0
File Permissions

Issues that cannot be fixed automatically

in Commits list, a `git rebase` is needed to remove any merges
  • Merge branch '2.17' into list-files-cmd
  • Merge branch '2.17' into list-files-cmd

0
Exception Messages Formatting

0
Usage of void in test files

0
Use ::class whenever possible