Passed
Push — master ( 1f5430...6b7dc4 )
by Théo
02:57
created
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.
@@ -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
         $this->scoper = new NullScoper();
89 89
     }
90 90
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     public function addFiles(array $files, bool $binary, bool $dumpAutoload = false): void
171 171
     {
172 172
         $files = array_map(
173
-            function ($file): string {
173
+            function($file): string {
174 174
                 // Convert files to string as SplFileInfo is not serializable
175 175
                 return (string) $file;
176 176
             },
@@ -314,9 +314,9 @@  discard block
 block discarded – undo
314 314
         $mapFile = $this->mapFile;
315 315
         $placeholders = $this->placeholders;
316 316
         $compactors = $this->compactors;
317
-        $bootstrap = $GLOBALS['_BOX_BOOTSTRAP'] ?? function (): void {};
317
+        $bootstrap = $GLOBALS['_BOX_BOOTSTRAP'] ?? function(): void {};
318 318
 
319
-        $processFile = function (string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors, $bootstrap): array {
319
+        $processFile = function(string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors, $bootstrap): array {
320 320
             chdir($cwd);
321 321
             $bootstrap();
322 322
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
     {
366 366
         return array_reduce(
367 367
             $compactors,
368
-            function (string $contents, Compactor $compactor) use ($file): string {
368
+            function(string $contents, Compactor $compactor) use ($file): string {
369 369
                 return $compactor->compact($file, $contents);
370 370
             },
371 371
             $contents
Please login to merge, or discard this patch.
src/bootstrap.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.
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 use function unlink;
28 28
 
29 29
 // TODO: update PHP-Scoper to get rid of this horrible hack at some point
30
-$findPhpScoperFunctions = function (): void {
30
+$findPhpScoperFunctions = function(): void {
31 31
     if (file_exists($autoload = __DIR__.'/../../php-scoper/src/functions.php')) {
32 32
         // Is installed via Composer
33 33
         require_once $autoload;
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
         }
52 52
 
53 53
         $pharPath = dirname(substr(__FILE__, 7), 2);
54
-        define('PHAR_COPY', sys_get_temp_dir().'/phar-'.bin2hex(random_bytes(10)). '.phar');
54
+        define('PHAR_COPY', sys_get_temp_dir().'/phar-'.bin2hex(random_bytes(10)).'.phar');
55 55
 
56 56
         copy($pharPath, \PHAR_COPY);
57 57
 
58
-        $autoload = 'phar://'.\PHAR_COPY. '/vendor/humbug/php-scoper/src/functions.php';
58
+        $autoload = 'phar://'.\PHAR_COPY.'/vendor/humbug/php-scoper/src/functions.php';
59 59
 
60
-        register_shutdown_function(static function () {
60
+        register_shutdown_function(static function() {
61 61
             @unlink(\PHAR_COPY);
62 62
         });
63 63
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     throw new RuntimeException('Unable to find the PHP-Scoper functions.');
70 70
 };
71 71
 
72
-$GLOBALS['_BOX_BOOTSTRAP'] = function () use ($findPhpScoperFunctions): void {
72
+$GLOBALS['_BOX_BOOTSTRAP'] = function() use ($findPhpScoperFunctions): void {
73 73
     $findPhpScoperFunctions();
74 74
 
75 75
     \KevinGH\Box\register_aliases();
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 // Convert errors to exceptions
80 80
 set_error_handler(
81
-    function ($code, $message, $file, $line): void {
81
+    function($code, $message, $file, $line): void {
82 82
         if (error_reporting() & $code) {
83 83
             throw new ErrorException($message, 0, $code, $file, $line);
84 84
         }
Please login to merge, or discard this patch.
scoper.inc.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.
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 
19 19
 return [
20 20
     'patchers' => [
21
-        function (string $filePath, string $prefix, string $contents): string {
21
+        function(string $filePath, string $prefix, string $contents): string {
22 22
             $finderClass = sprintf('\%s\%s', $prefix, Finder::class);
23 23
 
24 24
             return str_replace($finderClass, '\\'.Finder::class, $contents);
25 25
         },
26
-        function (string $filePath, string $prefix, string $contents): string {
26
+        function(string $filePath, string $prefix, string $contents): string {
27 27
             $file = 'vendor/beberlei/assert/lib/Assert/Assertion.php';
28 28
 
29 29
             if ($filePath !== $file) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 $contents
40 40
             );
41 41
         },
42
-        function (string $filePath, string $prefix, string $contents): string {
42
+        function(string $filePath, string $prefix, string $contents): string {
43 43
             $files = [
44 44
                 'src/functions.php',
45 45
                 'src/Configuration.php',
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 $contents
68 68
             );
69 69
         },
70
-        function (string $filePath, string $prefix, string $contents): string {
70
+        function(string $filePath, string $prefix, string $contents): string {
71 71
             if ('vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php' !== $filePath) {
72 72
                 return $contents;
73 73
             }
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
                 $contents
82 82
             );
83 83
         },
84
-        function (string $filePath, string $prefix, string $contents) use ($classLoaderContents): string {
84
+        function(string $filePath, string $prefix, string $contents) use ($classLoaderContents): string {
85 85
             return 'vendor/composer/composer/src/Composer/Autoload/ClassLoader.php' === $filePath ? $classLoaderContents : $contents;
86 86
         },
87
-        function (string $filePath, string $prefix, string $contents): string {
87
+        function(string $filePath, string $prefix, string $contents): string {
88 88
             if ('src/bootstrap.php' !== $filePath) {
89 89
                 return $contents;
90 90
             }
Please login to merge, or discard this patch.