Passed
Pull Request — master (#31)
by Théo
02:23
created
src/Configuration.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1231,7 +1231,7 @@
 block discarded – undo
1231 1231
             return file_exists($configFilePath)
1232 1232
                 ? PhpScoperConfiguration::load($configFilePath)
1233 1233
                 : PhpScoperConfiguration::load()
1234
-             ;
1234
+                ;
1235 1235
         }
1236 1236
 
1237 1237
         $configFile = $raw->phpScoper;
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * This file is part of the box project.
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
     {
484 484
         $blacklist = self::retrieveBlacklist($raw, $basePath);
485 485
 
486
-        return function (SplFileInfo $file) use ($blacklist): ?bool {
486
+        return function(SplFileInfo $file) use ($blacklist): ?bool {
487 487
             if (in_array($file->getRealPath(), $blacklist, true)) {
488 488
                 return false;
489 489
             }
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 
507 507
         $blacklist = $raw->blacklist;
508 508
 
509
-        $normalizePath = function ($file) use ($basePath): string {
509
+        $normalizePath = function($file) use ($basePath): string {
510 510
             return self::normalizeFilePath($file, $basePath);
511 511
         };
512 512
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 
531 531
         Assertion::allString($files);
532 532
 
533
-        $normalizePath = function (string $file) use ($basePath, $key): SplFileInfo {
533
+        $normalizePath = function(string $file) use ($basePath, $key): SplFileInfo {
534 534
             $file = self::normalizeFilePath($file, $basePath);
535 535
 
536 536
             if (is_link($file)) {
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
         Closure $blacklistFilter,
622 622
         array $devPackages
623 623
     ): array {
624
-        $processFinderConfig = function (stdClass $config) use ($basePath, $blacklistFilter, $devPackages) {
624
+        $processFinderConfig = function(stdClass $config) use ($basePath, $blacklistFilter, $devPackages) {
625 625
             return self::processFinder($config, $basePath, $blacklistFilter, $devPackages);
626 626
         };
627 627
 
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
             ->files()
643 643
             ->filter($blacklistFilter)
644 644
             ->filter(
645
-                function (SplFileInfo $fileInfo) use ($devPackages): bool {
645
+                function(SplFileInfo $fileInfo) use ($devPackages): bool {
646 646
                     foreach ($devPackages as $devPackage) {
647 647
                         if ($devPackage === longest_common_base_path([$devPackage, $fileInfo->getRealPath()])) {
648 648
                             // File belongs to the dev package
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
             ->ignoreVCS(true)
657 657
         ;
658 658
 
659
-        $normalizedConfig = (function (array $config, Finder $finder): array {
659
+        $normalizedConfig = (function(array $config, Finder $finder): array {
660 660
             $normalizedConfig = [];
661 661
 
662 662
             foreach ($config as $method => $arguments) {
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
             return $normalizedConfig;
678 678
         })((array) $config, $finder);
679 679
 
680
-        $createNormalizedDirectories = function (string $directory) use ($basePath): ?string {
680
+        $createNormalizedDirectories = function(string $directory) use ($basePath): ?string {
681 681
             $directory = self::normalizeDirectoryPath($directory, $basePath);
682 682
 
683 683
             if (is_link($directory)) {
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
             return $directory;
696 696
         };
697 697
 
698
-        $normalizeFileOrDirectory = function (string &$fileOrDirectory) use ($basePath): void {
698
+        $normalizeFileOrDirectory = function(string &$fileOrDirectory) use ($basePath): void {
699 699
             $fileOrDirectory = self::normalizeDirectoryPath($fileOrDirectory, $basePath);
700 700
 
701 701
             if (is_link($fileOrDirectory)) {
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
         array $devPackages
765 765
     ): array {
766 766
         $relativeDevPackages = array_map(
767
-            function (string $packagePath) use ($basePath): string {
767
+            function(string $packagePath) use ($basePath): string {
768 768
                 return make_path_relative($packagePath, $basePath);
769 769
             },
770 770
             $devPackages
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
         return array_filter(
783 783
             array_unique(
784 784
                 array_map(
785
-                    function (SplFileInfo $fileInfo): ?string {
785
+                    function(SplFileInfo $fileInfo): ?string {
786 786
                         if (is_link((string) $fileInfo)) {
787 787
                             return null;
788 788
                         }
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
 
813 813
         $directories = $raw->{$key};
814 814
 
815
-        $normalizeDirectory = function (string $directory) use ($basePath, $key): string {
815
+        $normalizeDirectory = function(string $directory) use ($basePath, $key): string {
816 816
             $directory = self::normalizeDirectoryPath($directory, $basePath);
817 817
 
818 818
             if (is_link($directory)) {
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
         $compactorClasses = array_unique((array) $raw->compactors);
878 878
 
879 879
         return array_map(
880
-            function (string $class) use ($raw, $basePath): Compactor {
880
+            function(string $class) use ($raw, $basePath): Compactor {
881 881
                 Assertion::classExists($class, 'The compactor class "%s" does not exist.');
882 882
                 Assertion::implementsInterface($class, Compactor::class, 'The class "%s" is not a compactor class.');
883 883
 
Please login to merge, or discard this patch.
src/Box.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * This file is part of the box project.
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $this->file = $file;
85 85
 
86 86
         $this->basePath = getcwd();
87
-        $this->mapFile = function (): void { };
87
+        $this->mapFile = function(): void { };
88 88
     }
89 89
 
90 90
     /**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
         $filesWithContents = $this->processContents(
183 183
             array_map(
184
-                function ($file): string {
184
+                function($file): string {
185 185
                     // Convert files to string as SplFileInfo is not serializable
186 186
                     return (string) $file;
187 187
                 },
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                 $processedContents = $contents;
257 257
             }
258 258
 
259
-            remove(self::DEBUG_DIR);    // Cleanup previous temporary debug directory
259
+            remove(self::DEBUG_DIR); // Cleanup previous temporary debug directory
260 260
             dump_file(self::DEBUG_DIR.DIRECTORY_SEPARATOR.$relativePath, $processedContents);
261 261
         }
262 262
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
         $placeholders = $this->placeholders;
329 329
         $compactors = $this->compactors;
330 330
 
331
-        $processFile = function (string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors): array {
331
+        $processFile = function(string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors): array {
332 332
             chdir($cwd);
333 333
 
334 334
             $contents = file_contents($file);
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
     {
377 377
         return array_reduce(
378 378
             $compactors,
379
-            function (string $contents, Compactor $compactor) use ($file): string {
379
+            function(string $contents, Compactor $compactor) use ($file): string {
380 380
                 return $compactor->compact($file, $contents);
381 381
             },
382 382
             $contents
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         $mainScript = current(
393 393
             array_filter(
394 394
                 scandir(self::DEBUG_DIR, 1),
395
-                function (string $file): bool {
395
+                function(string $file): bool {
396 396
                     return false === in_array($file, ['.', '..'], true);
397 397
                 }
398 398
             )
Please login to merge, or discard this patch.
scoper.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /*
6 6
  * This file is part of the box project.
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 return [
16 16
     'patchers' => [
17
-        function (string $filePath, string $prefix, string $contents): string {
17
+        function(string $filePath, string $prefix, string $contents): string {
18 18
             $file = 'vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php';
19 19
 
20 20
             if ($filePath !== $file) {
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
                 $contents
28 28
             );
29 29
         },
30
-        function (string $filePath, string $prefix, string $contents): string {
30
+        function(string $filePath, string $prefix, string $contents): string {
31 31
             $file = 'vendor/beberlei/assert/lib/Assert/Assertion.php';
32 32
 
33 33
             if ($filePath !== $file) {
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                 $contents
44 44
             );
45 45
         },
46
-        function (string $filePath, string $prefix, string $contents): string {
46
+        function(string $filePath, string $prefix, string $contents): string {
47 47
             $files = [
48 48
                 'src/functions.php',
49 49
                 'src/Configuration.php',
Please login to merge, or discard this patch.