@@ -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. |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | private static function dumpCheckScript(string ...$files): array |
| 112 | 112 | { |
| 113 | 113 | $autoloads = array_map( |
| 114 | - function (string $file): string { |
|
| 114 | + function(string $file): string { |
|
| 115 | 115 | return sprintf( |
| 116 | 116 | 'require_once __DIR__."/%s";', |
| 117 | 117 | $file |
@@ -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 @@ |
||
| 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. |
@@ -84,7 +84,7 @@ discard block |
||
| 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 |
||
| 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 | }, |
@@ -326,9 +326,9 @@ discard block |
||
| 326 | 326 | $mapFile = $this->mapFile; |
| 327 | 327 | $placeholders = $this->placeholders; |
| 328 | 328 | $compactors = $this->compactors; |
| 329 | - $bootstrap = $GLOBALS['bootstrap'] ?? function (): void {}; |
|
| 329 | + $bootstrap = $GLOBALS['bootstrap'] ?? function(): void {}; |
|
| 330 | 330 | |
| 331 | - $processFile = function (string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors, $bootstrap): array { |
|
| 331 | + $processFile = function(string $file) use ($cwd, $basePath, $mapFile, $placeholders, $compactors, $bootstrap): array { |
|
| 332 | 332 | chdir($cwd); |
| 333 | 333 | $bootstrap(); |
| 334 | 334 | |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | { |
| 378 | 378 | return array_reduce( |
| 379 | 379 | $compactors, |
| 380 | - function (string $contents, Compactor $compactor) use ($file): string { |
|
| 380 | + function(string $contents, Compactor $compactor) use ($file): string { |
|
| 381 | 381 | return $compactor->compact($file, $contents); |
| 382 | 382 | }, |
| 383 | 383 | $contents |
@@ -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. |
@@ -57,7 +57,7 @@ discard block |
||
| 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 |
||
| 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'] |
@@ -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. |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | use ErrorException; |
| 18 | 18 | use RuntimeException; |
| 19 | 19 | |
| 20 | -$findAutoloader = function () { |
|
| 20 | +$findAutoloader = function() { |
|
| 21 | 21 | if (file_exists($autoload = __DIR__.'/../../../autoload.php')) { |
| 22 | 22 | // Is installed via Composer |
| 23 | 23 | return $autoload; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | }; |
| 33 | 33 | |
| 34 | 34 | // TODO: update PHP-Scoper to get rid of this horrible hack at some point |
| 35 | -$findPhpScoperFunctions = function () { |
|
| 35 | +$findPhpScoperFunctions = function() { |
|
| 36 | 36 | if (file_exists($autoload = __DIR__.'/../../php-scoper/src/functions.php')) { |
| 37 | 37 | // Is installed via Composer |
| 38 | 38 | return $autoload; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | throw new RuntimeException('Unable to find the PHP-Scoper functions.'); |
| 47 | 47 | }; |
| 48 | 48 | |
| 49 | -$bootstrap = function () use ($findAutoloader, $findPhpScoperFunctions): void { |
|
| 49 | +$bootstrap = function() use ($findAutoloader, $findPhpScoperFunctions): void { |
|
| 50 | 50 | require_once $findAutoloader(); |
| 51 | 51 | require_once $findPhpScoperFunctions(); |
| 52 | 52 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | // Convert errors to exceptions |
| 60 | 60 | set_error_handler( |
| 61 | - function ($code, $message, $file, $line): void { |
|
| 61 | + function($code, $message, $file, $line): void { |
|
| 62 | 62 | if (error_reporting() & $code) { |
| 63 | 63 | throw new ErrorException($message, 0, $code, $file, $line); |
| 64 | 64 | } |
@@ -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. |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | return [ |
| 34 | 34 | 'patchers' => [ |
| 35 | - function (string $filePath, string $prefix, string $contents): string { |
|
| 35 | + function(string $filePath, string $prefix, string $contents): string { |
|
| 36 | 36 | $finderClass = sprintf('\%s\%s', $prefix, Finder::class); |
| 37 | 37 | |
| 38 | 38 | return str_replace($finderClass, '\\'.Finder::class, $contents); |
| 39 | 39 | }, |
| 40 | - function (string $filePath, string $prefix, string $contents): string { |
|
| 40 | + function(string $filePath, string $prefix, string $contents): string { |
|
| 41 | 41 | $file = 'vendor/beberlei/assert/lib/Assert/Assertion.php'; |
| 42 | 42 | |
| 43 | 43 | if ($filePath !== $file) { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $contents |
| 54 | 54 | ); |
| 55 | 55 | }, |
| 56 | - function (string $filePath, string $prefix, string $contents): string { |
|
| 56 | + function(string $filePath, string $prefix, string $contents): string { |
|
| 57 | 57 | $files = [ |
| 58 | 58 | 'src/functions.php', |
| 59 | 59 | 'src/Configuration.php', |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $contents |
| 82 | 82 | ); |
| 83 | 83 | }, |
| 84 | - function (string $filePath, string $prefix, string $contents): string { |
|
| 84 | + function(string $filePath, string $prefix, string $contents): string { |
|
| 85 | 85 | if ('vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php' !== $filePath) { |
| 86 | 86 | return $contents; |
| 87 | 87 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $contents |
| 96 | 96 | ); |
| 97 | 97 | }, |
| 98 | - function (string $filePath, string $prefix, string $contents) use ($whitelistedFiles): string { |
|
| 98 | + function(string $filePath, string $prefix, string $contents) use ($whitelistedFiles): string { |
|
| 99 | 99 | return array_key_exists($filePath, $whitelistedFiles) ? $whitelistedFiles[$filePath] : $contents; |
| 100 | 100 | }, |
| 101 | 101 | ], |
@@ -146,7 +146,7 @@ |
||
| 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 |