Completed
Pull Request — master (#31)
by Théo
02:27
created
src/Configuration.php 1 patch
Spacing   +10 added lines, -10 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.
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
     {
508 508
         $blacklist = self::retrieveBlacklist($raw, $basePath);
509 509
 
510
-        return function (SplFileInfo $file) use ($blacklist): ?bool {
510
+        return function(SplFileInfo $file) use ($blacklist): ?bool {
511 511
             if (in_array($file->getRealPath(), $blacklist, true)) {
512 512
                 return false;
513 513
             }
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 
528 528
         $blacklist = $raw->blacklist;
529 529
 
530
-        $normalizePath = function ($file) use ($basePath): string {
530
+        $normalizePath = function($file) use ($basePath): string {
531 531
             return self::normalizeFilePath($file, $basePath);
532 532
         };
533 533
 
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
 
552 552
         Assertion::allString($files);
553 553
 
554
-        $normalizePath = function (string $file) use ($basePath, $key): SplFileInfo {
554
+        $normalizePath = function(string $file) use ($basePath, $key): SplFileInfo {
555 555
             $file = self::normalizeFilePath($file, $basePath);
556 556
 
557 557
             Assertion::file(
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
      */
618 618
     private static function processFinders(array $findersConfig, string $basePath, Closure $blacklistFilter): array
619 619
     {
620
-        $processFinderConfig = function (stdClass $config) use ($basePath, $blacklistFilter) {
620
+        $processFinderConfig = function(stdClass $config) use ($basePath, $blacklistFilter) {
621 621
             return self::processFinder($config, $basePath, $blacklistFilter);
622 622
         };
623 623
 
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
             ->ignoreVCS(true)
640 640
         ;
641 641
 
642
-        $normalizedConfig = (function (array $config, Finder $finder): array {
642
+        $normalizedConfig = (function(array $config, Finder $finder): array {
643 643
             $normalizedConfig = [];
644 644
 
645 645
             foreach ($config as $method => $arguments) {
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
             return $normalizedConfig;
661 661
         })((array) $config, $finder);
662 662
 
663
-        $createNormalizedDirectories = function (string $directory) use ($basePath): string {
663
+        $createNormalizedDirectories = function(string $directory) use ($basePath): string {
664 664
             $directory = self::normalizeDirectoryPath($directory, $basePath);
665 665
 
666 666
             Assertion::directory($directory);
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
             return $directory;
669 669
         };
670 670
 
671
-        $normalizeFileOrDirectory = function (string &$fileOrDirectory) use ($basePath): void {
671
+        $normalizeFileOrDirectory = function(string &$fileOrDirectory) use ($basePath): void {
672 672
             $fileOrDirectory = self::normalizeDirectoryPath($fileOrDirectory, $basePath);
673 673
 
674 674
             if (false === file_exists($fileOrDirectory)) {
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
 
726 726
         $directories = $raw->{$key};
727 727
 
728
-        $normalizeDirectory = function (string $directory) use ($basePath, $key): string {
728
+        $normalizeDirectory = function(string $directory) use ($basePath, $key): string {
729 729
             $directory = self::normalizeDirectoryPath($directory, $basePath);
730 730
 
731 731
             Assertion::directory(
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
         $compactorClasses = array_unique((array) $raw->compactors);
813 813
 
814 814
         return array_map(
815
-            function (string $class) use ($raw, $basePath): Compactor {
815
+            function(string $class) use ($raw, $basePath): Compactor {
816 816
                 Assertion::classExists($class, 'The compactor class "%s" does not exist.');
817 817
                 Assertion::implementsInterface($class, Compactor::class, 'The class "%s" is not a compactor class.');
818 818
 
Please login to merge, or discard this patch.
src/Box.php 1 patch
Spacing   +6 added lines, -6 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.
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
         $this->phar = $phar;
68 68
         $this->file = $file;
69 69
 
70
-        $this->retrieveRelativeBasePath = function (string $path) { return $path; };
71
-        $this->mapFile = function (): void { };
70
+        $this->retrieveRelativeBasePath = function(string $path) { return $path; };
71
+        $this->mapFile = function(): void { };
72 72
     }
73 73
 
74 74
     /**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             $tuples = $this->processContents(
163 163
             // Convert files to string as SplFileInfo is not serializable
164 164
                 array_map(
165
-                    function ($file): string {
165
+                    function($file): string {
166 166
                         return (string) $file;
167 167
                     },
168 168
                     $files
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         $placeholders = $this->placeholders;
290 290
         $compactors = $this->compactors;
291 291
 
292
-        $processFile = function (string $file) use ($retrieveRelativeBasePath, $mapFile, $placeholders, $compactors, $tmp): array {
292
+        $processFile = function(string $file) use ($retrieveRelativeBasePath, $mapFile, $placeholders, $compactors, $tmp): array {
293 293
             Assertion::file($file);
294 294
             Assertion::readable($file);
295 295
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
     {
338 338
         return array_reduce(
339 339
             $compactors,
340
-            function (string $contents, Compactor $compactor) use ($file): string {
340
+            function(string $contents, Compactor $compactor) use ($file): string {
341 341
                 return $compactor->compact($file, $contents);
342 342
             },
343 343
             $contents
Please login to merge, or discard this patch.