@@ -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. |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | return $main; |
| 683 | 683 | } |
| 684 | 684 | |
| 685 | - private function registerStub(Configuration $config, Box $box, ?string $main, BuildLogger $logger): void |
|
| 685 | + private function registerStub(Configuration $config, Box $box, ?string $main, BuildLogger $logger) : void |
|
| 686 | 686 | { |
| 687 | 687 | if (true === $config->isStubGenerated()) { |
| 688 | 688 | $logger->log( |
@@ -830,7 +830,7 @@ discard block |
||
| 830 | 830 | ?string $message, |
| 831 | 831 | bool $binary, |
| 832 | 832 | BuildLogger $logger |
| 833 | - ): void { |
|
| 833 | + ) : void { |
|
| 834 | 834 | static $count = 0; |
| 835 | 835 | |
| 836 | 836 | if (null === $iterator) { |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | } |
| 879 | 879 | } |
| 880 | 880 | |
| 881 | - private function createStub(Configuration $config, ?string $main, BuildLogger $logger): StubGenerator |
|
| 881 | + private function createStub(Configuration $config, ?string $main, BuildLogger $logger) : StubGenerator |
|
| 882 | 882 | { |
| 883 | 883 | $stub = StubGenerator::create() |
| 884 | 884 | ->alias($config->getAlias()) |
@@ -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. |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | return realpath(self::FILE_NAME); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - public function loadFile(?string $file): Configuration |
|
| 69 | + public function loadFile(?string $file) : Configuration |
|
| 70 | 70 | { |
| 71 | 71 | if (null === $file) { |
| 72 | 72 | $file = $this->findDefaultPath(); |
@@ -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. |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | |
| 544 | 544 | array_walk( |
| 545 | 545 | $directories, |
| 546 | - function (&$directory) use ($basePath): void { |
|
| 546 | + function(&$directory) use ($basePath): void { |
|
| 547 | 547 | $directory = $basePath |
| 548 | 548 | .DIRECTORY_SEPARATOR |
| 549 | 549 | .Path::canonical($directory); |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | |
| 618 | 618 | array_walk( |
| 619 | 619 | $blacklist, |
| 620 | - function (&$file): void { |
|
| 620 | + function(&$file): void { |
|
| 621 | 621 | $file = Path::canonical($file); |
| 622 | 622 | } |
| 623 | 623 | ); |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | preg_quote($basePath.DIRECTORY_SEPARATOR, '/') |
| 642 | 642 | ); |
| 643 | 643 | |
| 644 | - return function (SplFileInfo $file) use ($base, $blacklist): ?bool { |
|
| 644 | + return function(SplFileInfo $file) use ($base, $blacklist): ?bool { |
|
| 645 | 645 | $path = Path::canonical( |
| 646 | 646 | preg_replace($base, '', $file->getPathname()) |
| 647 | 647 | ); |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | |
| 684 | 684 | array_walk( |
| 685 | 685 | $directories, |
| 686 | - function (&$directory) use ($basePath): void { |
|
| 686 | + function(&$directory) use ($basePath): void { |
|
| 687 | 687 | $directory = $basePath |
| 688 | 688 | .DIRECTORY_SEPARATOR |
| 689 | 689 | .rtrim(Path::canonical($directory), DIRECTORY_SEPARATOR); |
@@ -786,7 +786,7 @@ discard block |
||
| 786 | 786 | */ |
| 787 | 787 | private static function processFinders(array $findersConfig, string $basePath, Closure $blacklistFilter): array |
| 788 | 788 | { |
| 789 | - $processFinderConfig = function ($methods) use ($basePath, $blacklistFilter): Finder { |
|
| 789 | + $processFinderConfig = function($methods) use ($basePath, $blacklistFilter): Finder { |
|
| 790 | 790 | $finder = Finder::create() |
| 791 | 791 | ->files() |
| 792 | 792 | ->filter($blacklistFilter) |
@@ -798,7 +798,7 @@ discard block |
||
| 798 | 798 | |
| 799 | 799 | array_walk( |
| 800 | 800 | $methods->in, |
| 801 | - function (&$directory) use ($basePath): void { |
|
| 801 | + function(&$directory) use ($basePath): void { |
|
| 802 | 802 | $directory = Path::canonical( |
| 803 | 803 | $basePath.DIRECTORY_SEPARATOR.$directory |
| 804 | 804 | ); |
@@ -954,7 +954,7 @@ discard block |
||
| 954 | 954 | return null; |
| 955 | 955 | } |
| 956 | 956 | |
| 957 | - private static function retrieveMainScriptContents(?string $mainScriptPath, string $basePath): ?string |
|
| 957 | + private static function retrieveMainScriptContents(?string $mainScriptPath, string $basePath) : ?string |
|
| 958 | 958 | { |
| 959 | 959 | if (null === $mainScriptPath) { |
| 960 | 960 | return null; |
@@ -1006,7 +1006,7 @@ discard block |
||
| 1006 | 1006 | |
| 1007 | 1007 | private static function retrieveMapper(array $map): Closure |
| 1008 | 1008 | { |
| 1009 | - return function (string $path) use ($map): ?string { |
|
| 1009 | + return function(string $path) use ($map): ?string { |
|
| 1010 | 1010 | foreach ($map as $item) { |
| 1011 | 1011 | foreach ($item as $match => $replace) { |
| 1012 | 1012 | if (empty($match)) { |
@@ -1347,7 +1347,7 @@ discard block |
||
| 1347 | 1347 | return null; |
| 1348 | 1348 | } |
| 1349 | 1349 | |
| 1350 | - private static function retrieveStubBannerFromFile(string $basePath, ?string $stubBannerPath): ?string |
|
| 1350 | + private static function retrieveStubBannerFromFile(string $basePath, ?string $stubBannerPath) : ?string |
|
| 1351 | 1351 | { |
| 1352 | 1352 | if (null == $stubBannerPath) { |
| 1353 | 1353 | return null; |