@@ -1,6 +1,6 @@ |
||
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. |
@@ -1,6 +1,6 @@ |
||
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. |
@@ -1,6 +1,6 @@ discard block |
||
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. |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | return array_filter( |
85 | 85 | array_map( |
86 | - function (string $packageName) use ($vendorDir): ?string { |
|
86 | + function(string $packageName) use ($vendorDir): ?string { |
|
87 | 87 | $realPath = realpath($vendorDir.DIRECTORY_SEPARATOR.$packageName); |
88 | 88 | |
89 | 89 | return false !== $realPath ? $realPath : null; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | return array_map( |
150 | - function (array $package): string { |
|
150 | + function(array $package): string { |
|
151 | 151 | return $package['name']; |
152 | 152 | }, |
153 | 153 | $config['packages-dev'] |
@@ -1,6 +1,6 @@ discard block |
||
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. |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
56 | - return false === $assoc ? (object) $data : $data; // If JSON is an empty JSON json_decode returns an empty |
|
56 | + return false === $assoc ? (object) $data : $data; // If JSON is an empty JSON json_decode returns an empty |
|
57 | 57 | // array instead of an stdClass instance |
58 | 58 | } |
59 | 59 |
@@ -1,6 +1,6 @@ discard block |
||
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. |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | 'Registering compactors' |
224 | 224 | ); |
225 | 225 | |
226 | - $logCompactors = function (Compactor $compactor) use ($logger): void { |
|
226 | + $logCompactors = function(Compactor $compactor) use ($logger): void { |
|
227 | 227 | $logger->log( |
228 | 228 | BuildLogger::PLUS_PREFIX, |
229 | 229 | get_class($compactor) |
@@ -1,6 +1,6 @@ |
||
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. |
@@ -1,6 +1,6 @@ discard block |
||
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 |
||
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/beberlei/assert/lib/Assert/Assertion.php'; |
19 | 19 | |
20 | 20 | if ($filePath !== $file) { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $contents |
31 | 31 | ); |
32 | 32 | }, |
33 | - function (string $filePath, string $prefix, string $contents): string { |
|
33 | + function(string $filePath, string $prefix, string $contents): string { |
|
34 | 34 | $files = [ |
35 | 35 | 'src/functions.php', |
36 | 36 | 'src/Configuration.php', |
@@ -1,6 +1,6 @@ discard block |
||
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. |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $this->file = $file; |
86 | 86 | |
87 | 87 | $this->basePath = getcwd(); |
88 | - $this->mapFile = function (): void { }; |
|
88 | + $this->mapFile = function(): void { }; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | /** |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | |
183 | 183 | $filesWithContents = $this->processContents( |
184 | 184 | array_map( |
185 | - function ($file): string { |
|
185 | + function($file): string { |
|
186 | 186 | // Convert files to string as SplFileInfo is not serializable |
187 | 187 | return (string) $file; |
188 | 188 | }, |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $processedContents = $contents; |
261 | 261 | } |
262 | 262 | |
263 | - remove(self::DEBUG_DIR); // Cleanup previous temporary debug directory |
|
263 | + remove(self::DEBUG_DIR); // Cleanup previous temporary debug directory |
|
264 | 264 | dump_file(self::DEBUG_DIR.DIRECTORY_SEPARATOR.$relativePath, $processedContents); |
265 | 265 | } |
266 | 266 | |
@@ -331,9 +331,9 @@ discard block |
||
331 | 331 | $mapFile = $this->mapFile; |
332 | 332 | $placeholders = $this->placeholders; |
333 | 333 | $compactors = $this->compactors; |
334 | - $bootstrap = $GLOBALS['bootstrap'] ?? function (): void {}; |
|
334 | + $bootstrap = $GLOBALS['bootstrap'] ?? function(): void {}; |
|
335 | 335 | |
336 | - $processFile = function (string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors, $bootstrap): array { |
|
336 | + $processFile = function(string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors, $bootstrap): array { |
|
337 | 337 | chdir($cwd); |
338 | 338 | $bootstrap(); |
339 | 339 | |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | { |
383 | 383 | return array_reduce( |
384 | 384 | $compactors, |
385 | - function (string $contents, Compactor $compactor) use ($file): string { |
|
385 | + function(string $contents, Compactor $compactor) use ($file): string { |
|
386 | 386 | return $compactor->compact($file, $contents); |
387 | 387 | }, |
388 | 388 | $contents |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | $mainScript = current( |
399 | 399 | array_filter( |
400 | 400 | scandir($debugDir, 1), |
401 | - function (string $file): bool { |
|
401 | + function(string $file): bool { |
|
402 | 402 | return false === in_array($file, ['.', '..'], true); |
403 | 403 | } |
404 | 404 | ) |
@@ -352,7 +352,7 @@ |
||
352 | 352 | private function retrieveCompressionCount(Phar $phar): array |
353 | 353 | { |
354 | 354 | $count = array_fill_keys( |
355 | - self::ALGORITHMS, |
|
355 | + self::ALGORITHMS, |
|
356 | 356 | 0 |
357 | 357 | ); |
358 | 358 |
@@ -1,6 +1,6 @@ discard block |
||
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. |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | 0 |
352 | 352 | ); |
353 | 353 | |
354 | - $countFile = function (array $count, PharFileInfo $file) { |
|
354 | + $countFile = function(array $count, PharFileInfo $file) { |
|
355 | 355 | if (false === $file->isCompressed()) { |
356 | 356 | ++$count['None']; |
357 | 357 |