@@ -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 | }, |
@@ -314,9 +314,9 @@ discard block |
||
| 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 |
||
| 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 |
@@ -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. |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | use function substr; |
| 23 | 23 | use function var_dump; |
| 24 | 24 | |
| 25 | -$findAutoloader = function () { |
|
| 25 | +$findAutoloader = function() { |
|
| 26 | 26 | // if (file_exists($autoload = __DIR__.'/../../../autoload.php')) { |
| 27 | 27 | // // Is installed via Composer |
| 28 | 28 | // return $autoload; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | }; |
| 49 | 49 | |
| 50 | 50 | // TODO: update PHP-Scoper to get rid of this horrible hack at some point |
| 51 | -$findPhpScoperFunctions = function (): void { |
|
| 51 | +$findPhpScoperFunctions = function(): void { |
|
| 52 | 52 | if (file_exists($autoload = __DIR__.'/../../php-scoper/src/functions.php')) { |
| 53 | 53 | // Is installed via Composer |
| 54 | 54 | require_once $autoload; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | throw new RuntimeException('Unable to find the PHP-Scoper functions.'); |
| 80 | 80 | }; |
| 81 | 81 | |
| 82 | -$bootstrap = function () use ($findAutoloader, $findPhpScoperFunctions): void { |
|
| 82 | +$bootstrap = function() use ($findAutoloader, $findPhpScoperFunctions): void { |
|
| 83 | 83 | // require_once $findAutoloader(); |
| 84 | 84 | $findPhpScoperFunctions(); |
| 85 | 85 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | // Convert errors to exceptions |
| 93 | 93 | set_error_handler( |
| 94 | - function ($code, $message, $file, $line): void { |
|
| 94 | + function($code, $message, $file, $line): void { |
|
| 95 | 95 | if (error_reporting() & $code) { |
| 96 | 96 | throw new ErrorException($message, 0, $code, $file, $line); |
| 97 | 97 | } |