Passed
Push — master ( d0d15e...691580 )
by Théo
02:45
created
requirement-checker/src/RequirementCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
              *
147 147
              * @return bool
148 148
              */
149
-            function ($checkPassed, Requirement $requirement) {
149
+            function($checkPassed, Requirement $requirement) {
150 150
                 return $checkPassed && $requirement->isFulfilled();
151 151
             },
152 152
             true
Please login to merge, or discard this patch.
scoper.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -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.
requirement-checker/tests/CheckerTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $phpVersion = PHP_VERSION;
65 65
 
66
-        yield (function () use ($phpVersion) {
66
+        yield (function() use ($phpVersion) {
67 67
             return [
68 68
                 new RequirementCollection(),
69 69
                 IO::VERBOSITY_DEBUG,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             ];
89 89
         })();
90 90
 
91
-        yield (function () use ($phpVersion) {
91
+        yield (function() use ($phpVersion) {
92 92
             return [
93 93
                 new RequirementCollection(),
94 94
                 IO::VERBOSITY_VERY_VERBOSE,
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         })();
115 115
 
116 116
         foreach ([IO::VERBOSITY_VERBOSE, IO::VERBOSITY_NORMAL, IO::VERBOSITY_QUIET] as $verbosity) {
117
-            yield (function () use ($verbosity) {
117
+            yield (function() use ($verbosity) {
118 118
                 return [
119 119
                     new RequirementCollection(),
120 120
                     $verbosity,
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             })();
125 125
         }
126 126
 
127
-        yield (function () use ($phpVersion) {
127
+        yield (function() use ($phpVersion) {
128 128
             $requirements = new RequirementCollection();
129 129
 
130 130
             $requirements->addRequirement(
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             ];
165 165
         })();
166 166
 
167
-        yield (function () use ($phpVersion) {
167
+        yield (function() use ($phpVersion) {
168 168
             $requirements = new RequirementCollection();
169 169
 
170 170
             $requirements->addRequirement(
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         })();
205 205
 
206 206
         foreach ([IO::VERBOSITY_VERBOSE, IO::VERBOSITY_NORMAL, IO::VERBOSITY_QUIET] as $verbosity) {
207
-            yield (function () use ($verbosity) {
207
+            yield (function() use ($verbosity) {
208 208
                 $requirements = new RequirementCollection();
209 209
 
210 210
                 $requirements->addRequirement(
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             })();
228 228
         }
229 229
 
230
-        yield (function () use ($phpVersion) {
230
+        yield (function() use ($phpVersion) {
231 231
             $requirements = new RequirementCollection();
232 232
 
233 233
             $requirements->addRequirement(
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         })();
276 276
 
277 277
         foreach ([IO::VERBOSITY_VERY_VERBOSE, IO::VERBOSITY_VERBOSE, IO::VERBOSITY_NORMAL] as $verbosity) {
278
-            yield (function () use ($verbosity, $phpVersion) {
278
+            yield (function() use ($verbosity, $phpVersion) {
279 279
                 $requirements = new RequirementCollection();
280 280
 
281 281
                 $requirements->addRequirement(
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
             })();
322 322
         }
323 323
 
324
-        yield (function () use ($phpVersion) {
324
+        yield (function() use ($phpVersion) {
325 325
             $requirements = new RequirementCollection();
326 326
 
327 327
             $requirements->addRequirement(
Please login to merge, or discard this patch.
src/Composer/ComposerConfiguration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         return array_filter(
59 59
             array_map(
60
-                function (string $packageName) use ($vendorDir): ?string {
60
+                function(string $packageName) use ($vendorDir): ?string {
61 61
                     $realPath = realpath($vendorDir.DIRECTORY_SEPARATOR.$packageName);
62 62
 
63 63
                     return false !== $realPath ? $realPath : null;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         return array_map(
93
-            function (array $package): string {
93
+            function(array $package): string {
94 94
                 return $package['name'];
95 95
             },
96 96
             $composerLockDecodedContents['packages-dev']
Please login to merge, or discard this patch.
src/Json/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             }
57 57
         }
58 58
 
59
-        return false === $assoc ? (object) $data : $data;   // If JSON is an empty JSON json_decode returns an empty
59
+        return false === $assoc ? (object) $data : $data; // If JSON is an empty JSON json_decode returns an empty
60 60
                                                             // array instead of an stdClass instance
61 61
     }
62 62
 
Please login to merge, or discard this patch.
src/bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
 
17 17
 use ErrorException;
18 18
 
19
-($GLOBALS['_BOX_BOOTSTRAP'] = function (): void {
19
+($GLOBALS['_BOX_BOOTSTRAP'] = function(): void {
20 20
     \KevinGH\Box\register_aliases();
21 21
 })();
22 22
 
23 23
 // Convert errors to exceptions
24 24
 set_error_handler(
25
-    function (int $code, string $message, string $file = '', int $line = -1): void {
25
+    function(int $code, string $message, string $file = '', int $line = -1): void {
26 26
         if (error_reporting() & $code) {
27 27
             throw new ErrorException($message, 0, $code, (string) $file, $line);
28 28
         }
Please login to merge, or discard this patch.
src/Console/Command/Info.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -427,7 +427,7 @@
 block discarded – undo
427 427
             return $count;
428 428
         }
429 429
 
430
-        $countFile = function (array $count, PharFileInfo $file): array {
430
+        $countFile = function(array $count, PharFileInfo $file): array {
431 431
             if (false === $file->isCompressed()) {
432 432
                 ++$count['None'];
433 433
 
Please login to merge, or discard this patch.
src/Box.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->file = $file;
91 91
 
92 92
         $this->basePath = getcwd();
93
-        $this->mapFile = function (): void { };
93
+        $this->mapFile = function(): void { };
94 94
         $this->scoper = new NullScoper();
95 95
     }
96 96
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         Assertion::true($this->buffering, 'Cannot add files if the buffering has not started.');
219 219
 
220 220
         $files = array_map(
221
-            function ($file): string {
221
+            function($file): string {
222 222
                 // Convert files to string as SplFileInfo is not serializable
223 223
                 return (string) $file;
224 224
             },
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
         $mapFile = $this->mapFile;
342 342
         $placeholders = $this->placeholders;
343 343
         $compactors = $this->compactors;
344
-        $bootstrap = $GLOBALS['_BOX_BOOTSTRAP'] ?? function (): void {};
344
+        $bootstrap = $GLOBALS['_BOX_BOOTSTRAP'] ?? function(): void {};
345 345
         $cwd = getcwd();
346 346
 
347
-        $processFile = function (string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors, $bootstrap): array {
347
+        $processFile = function(string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors, $bootstrap): array {
348 348
             chdir($cwd);
349 349
             $bootstrap();
350 350
 
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     {
394 394
         return array_reduce(
395 395
             $compactors,
396
-            function (string $contents, Compactor $compactor) use ($file): string {
396
+            function(string $contents, Compactor $compactor) use ($file): string {
397 397
                 return $compactor->compact($file, $contents);
398 398
             },
399 399
             $contents
Please login to merge, or discard this patch.
src/Console/Command/Compile.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
             'Registering compactors'
375 375
         );
376 376
 
377
-        $logCompactors = function (Compactor $compactor) use ($logger): void {
377
+        $logCompactors = function(Compactor $compactor) use ($logger): void {
378 378
             $compactorClassParts = explode('\\', get_class($compactor));
379 379
 
380 380
             if ('_HumbugBox' === substr($compactorClassParts[0], 0, strlen('_HumbugBox'))) {
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
      */
614 614
     private function bumpOpenFileDescriptorLimit(Box $box, SymfonyStyle $io): callable
615 615
     {
616
-        $filesCount = count($box) + 128;  // Add a little extra for good measure
616
+        $filesCount = count($box) + 128; // Add a little extra for good measure
617 617
 
618 618
         if (function_exists('posix_getrlimit') && function_exists('posix_setrlimit')) {
619 619
             $softLimit = posix_getrlimit()['soft openfiles'];
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
             );
647 647
         }
648 648
 
649
-        return function () use ($io, $softLimit, $hardLimit): void {
649
+        return function() use ($io, $softLimit, $hardLimit): void {
650 650
             if (function_exists('posix_setrlimit') && isset($softLimit, $hardLimit)) {
651 651
                 posix_setrlimit(
652 652
                     POSIX_RLIMIT_NOFILE,
Please login to merge, or discard this patch.