Passed
Pull Request — master (#196)
by Théo
02:31
created
src/Configuration.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
     {
568 568
         $blacklist = self::retrieveBlacklist($raw, $basePath, ...$excludedPaths);
569 569
 
570
-        $blacklistFilter = function (SplFileInfo $file) use ($blacklist): ?bool {
570
+        $blacklistFilter = function(SplFileInfo $file) use ($blacklist): ?bool {
571 571
             if ($file->isLink()) {
572 572
                 return false;
573 573
             }
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 
640 640
         Assertion::allString($files);
641 641
 
642
-        $normalizePath = function (string $file) use ($basePath, $key, $mainScriptPath): ?SplFileInfo {
642
+        $normalizePath = function(string $file) use ($basePath, $key, $mainScriptPath): ?SplFileInfo {
643 643
             $file = self::normalizePath($file, $basePath);
644 644
 
645 645
             if (is_link($file)) {
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
         Closure $blacklistFilter,
758 758
         array $devPackages
759 759
     ): array {
760
-        $processFinderConfig = function (stdClass $config) use ($basePath, $blacklistFilter, $devPackages) {
760
+        $processFinderConfig = function(stdClass $config) use ($basePath, $blacklistFilter, $devPackages) {
761 761
             return self::processFinder($config, $basePath, $blacklistFilter, $devPackages);
762 762
         };
763 763
 
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
             ->files()
783 783
             ->filter($blacklistFilter)
784 784
             ->filter(
785
-                function (SplFileInfo $fileInfo) use ($devPackages): bool {
785
+                function(SplFileInfo $fileInfo) use ($devPackages): bool {
786 786
                     foreach ($devPackages as $devPackage) {
787 787
                         if ($devPackage === longest_common_base_path([$devPackage, $fileInfo->getRealPath()])) {
788 788
                             // File belongs to the dev package
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
             ->ignoreVCS(true)
797 797
         ;
798 798
 
799
-        $normalizedConfig = (function (array $config, Finder $finder): array {
799
+        $normalizedConfig = (function(array $config, Finder $finder): array {
800 800
             $normalizedConfig = [];
801 801
 
802 802
             foreach ($config as $method => $arguments) {
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
             return $normalizedConfig;
818 818
         })((array) $config, $finder);
819 819
 
820
-        $createNormalizedDirectories = function (string $directory) use ($basePath): ?string {
820
+        $createNormalizedDirectories = function(string $directory) use ($basePath): ?string {
821 821
             $directory = self::normalizePath($directory, $basePath);
822 822
 
823 823
             if (is_link($directory)) {
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
             return $directory;
836 836
         };
837 837
 
838
-        $normalizeFileOrDirectory = function (string &$fileOrDirectory) use ($basePath, $blacklistFilter): void {
838
+        $normalizeFileOrDirectory = function(string &$fileOrDirectory) use ($basePath, $blacklistFilter): void {
839 839
             $fileOrDirectory = self::normalizePath($fileOrDirectory, $basePath);
840 840
 
841 841
             if (is_link($fileOrDirectory)) {
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
         array $filesToAppend,
907 907
         array $excludedPaths
908 908
     ): array {
909
-        $toString = function ($file): string {
909
+        $toString = function($file): string {
910 910
             /** @param string|SplFileInfo $file */
911 911
             return (string) $file;
912 912
         };
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
                     ->depth(1)
929 929
                     ->ignoreUnreadableDirs()
930 930
                     ->filter(
931
-                        function (SplFileInfo $fileInfo): ?bool {
931
+                        function(SplFileInfo $fileInfo): ?bool {
932 932
                             if ($fileInfo->isLink()) {
933 933
                                 return false;
934 934
                             }
@@ -1002,7 +1002,7 @@  discard block
 block discarded – undo
1002 1002
             }
1003 1003
         }
1004 1004
 
1005
-        $normalizePath = function (string $path) use ($basePath): string {
1005
+        $normalizePath = function(string $path) use ($basePath): string {
1006 1006
             return is_absolute_path($path)
1007 1007
                 ? canonicalize($path)
1008 1008
                 : self::normalizePath(trim($path, '/ '), $basePath)
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
         array $devPackages
1062 1062
     ): array {
1063 1063
         $relativeDevPackages = array_map(
1064
-            function (string $packagePath) use ($basePath): string {
1064
+            function(string $packagePath) use ($basePath): string {
1065 1065
                 return make_path_relative($packagePath, $basePath);
1066 1066
             },
1067 1067
             $devPackages
@@ -1137,12 +1137,12 @@  discard block
 block discarded – undo
1137 1137
         $excludedPaths = array_unique(
1138 1138
             array_filter(
1139 1139
                 array_map(
1140
-                    function (string $path) use ($basePath): string {
1140
+                    function(string $path) use ($basePath): string {
1141 1141
                         return make_path_relative($path, $basePath);
1142 1142
                     },
1143 1143
                     $excludedPaths
1144 1144
                 ),
1145
-                function (string $path): bool {
1145
+                function(string $path): bool {
1146 1146
                     return '..' !== substr($path, 0, 2);
1147 1147
                 }
1148 1148
             )
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
 
1178 1178
         $directories = $raw->{$key};
1179 1179
 
1180
-        $normalizeDirectory = function (string $directory) use ($basePath, $key): string {
1180
+        $normalizeDirectory = function(string $directory) use ($basePath, $key): string {
1181 1181
             $directory = self::normalizePath($directory, $basePath);
1182 1182
 
1183 1183
             if (is_link($directory)) {
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
         $compactorClasses = array_unique((array) $raw->compactors);
1222 1222
 
1223 1223
         return array_map(
1224
-            function (string $class) use ($raw, $basePath): Compactor {
1224
+            function(string $class) use ($raw, $basePath): Compactor {
1225 1225
                 Assertion::classExists($class, 'The compactor class "%s" does not exist.');
1226 1226
                 Assertion::implementsInterface($class, Compactor::class, 'The class "%s" is not a compactor class.');
1227 1227
 
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
 
1312 1312
     private static function retrieveComposerFiles(string $basePath): array
1313 1313
     {
1314
-        $retrieveFileAndContents = function (string $file): array {
1314
+        $retrieveFileAndContents = function(string $file): array {
1315 1315
             $json = new Json();
1316 1316
 
1317 1317
             if (false === file_exists($file) || false === is_file($file) || false === is_readable($file)) {
Please login to merge, or discard this patch.