@@ -45,37 +45,37 @@ |
||
| 45 | 45 | { |
| 46 | 46 | return [ |
| 47 | 47 | 'empty composer definition' => [ |
| 48 | - __DIR__ . '/../../asset/located-sources/empty', |
|
| 48 | + __DIR__.'/../../asset/located-sources/empty', |
|
| 49 | 49 | new AggregateSourceLocator([ |
| 50 | 50 | new DirectoriesSourceLocator([], $this->astLocator()), |
| 51 | 51 | ]), |
| 52 | 52 | ], |
| 53 | 53 | 'composer definition with everything' => [ |
| 54 | - __DIR__ . '/../../asset/located-sources/composer-definition-with-everything', |
|
| 54 | + __DIR__.'/../../asset/located-sources/composer-definition-with-everything', |
|
| 55 | 55 | new AggregateSourceLocator([ |
| 56 | 56 | new DirectoriesSourceLocator( |
| 57 | 57 | [ |
| 58 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/foo0'), |
|
| 59 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/bar4'), |
|
| 60 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/baz4_0'), |
|
| 61 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/baz4_1'), |
|
| 62 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/baz4_2'), |
|
| 63 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/baz4_3'), |
|
| 64 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/classmap0'), |
|
| 65 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/classmap1'), |
|
| 58 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/foo0'), |
|
| 59 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/bar4'), |
|
| 60 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/baz4_0'), |
|
| 61 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/baz4_1'), |
|
| 62 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/baz4_2'), |
|
| 63 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/baz4_3'), |
|
| 64 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/classmap0'), |
|
| 65 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/classmap1'), |
|
| 66 | 66 | ], |
| 67 | 67 | $this->astLocator() |
| 68 | 68 | ), |
| 69 | 69 | new SingleFileSourceLocator( |
| 70 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/classmap2/file.php'), |
|
| 70 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/classmap2/file.php'), |
|
| 71 | 71 | $this->astLocator() |
| 72 | 72 | ), |
| 73 | 73 | new SingleFileSourceLocator( |
| 74 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/files/foo.php'), |
|
| 74 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/files/foo.php'), |
|
| 75 | 75 | $this->astLocator() |
| 76 | 76 | ), |
| 77 | 77 | new SingleFileSourceLocator( |
| 78 | - $this->realPath(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything/files/bar.php'), |
|
| 78 | + $this->realPath(__DIR__.'/../../asset/located-sources/composer-definition-with-everything/files/bar.php'), |
|
| 79 | 79 | $this->astLocator() |
| 80 | 80 | ), |
| 81 | 81 | ]), |
@@ -43,8 +43,8 @@ |
||
| 43 | 43 | $composerJsonPath = $realInstallationPath . '/composer.json'; |
| 44 | 44 | |
| 45 | 45 | Assert::that($composerJsonPath) |
| 46 | - ->file() |
|
| 47 | - ->readable(); |
|
| 46 | + ->file() |
|
| 47 | + ->readable(); |
|
| 48 | 48 | |
| 49 | 49 | $composerDefinitionString = file_get_contents($composerJsonPath); |
| 50 | 50 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | Assert::that($realInstallationPath)->string(); |
| 42 | 42 | |
| 43 | - $composerJsonPath = $realInstallationPath . '/composer.json'; |
|
| 43 | + $composerJsonPath = $realInstallationPath.'/composer.json'; |
|
| 44 | 44 | |
| 45 | 45 | Assert::that($composerJsonPath) |
| 46 | 46 | ->file() |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | ), |
| 76 | 76 | ], |
| 77 | 77 | array_map( |
| 78 | - function (string $path) : SourceLocator { |
|
| 78 | + function(string $path) : SourceLocator { |
|
| 79 | 79 | return new SingleFileSourceLocator($path, $this->astLocator); |
| 80 | 80 | }, |
| 81 | 81 | array_map( |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | ) |
| 85 | 85 | ), |
| 86 | 86 | array_map( |
| 87 | - function (string $path) : SourceLocator { |
|
| 87 | + function(string $path) : SourceLocator { |
|
| 88 | 88 | return new SingleFileSourceLocator($path, $this->astLocator); |
| 89 | 89 | }, |
| 90 | 90 | array_map( |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | { |
| 105 | 105 | return array_values(array_filter( |
| 106 | 106 | $autoloadDefinition['classmap'] ?? [], |
| 107 | - function (string $path) use ($installationPath) : bool { |
|
| 107 | + function(string $path) use ($installationPath) : bool { |
|
| 108 | 108 | $filePath = ($this->prependInstallationPath($installationPath))($path); |
| 109 | 109 | |
| 110 | 110 | return is_dir($filePath); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | { |
| 122 | 122 | return array_values(array_filter( |
| 123 | 123 | $autoloadDefinition['classmap'] ?? [], |
| 124 | - function (string $path) use ($installationPath) : bool { |
|
| 124 | + function(string $path) use ($installationPath) : bool { |
|
| 125 | 125 | $filePath = ($this->prependInstallationPath($installationPath))($path); |
| 126 | 126 | |
| 127 | 127 | return is_file($filePath); |
@@ -168,12 +168,12 @@ discard block |
||
| 168 | 168 | /** @return callable (string $path) : string */ |
| 169 | 169 | private function prependInstallationPath(string $installationPath) : callable |
| 170 | 170 | { |
| 171 | - return function (string $path) use ($installationPath) : string { |
|
| 171 | + return function(string $path) use ($installationPath) : string { |
|
| 172 | 172 | if (strpos($path, './') === 0) { |
| 173 | - return $installationPath . '/' . substr($path, 2); |
|
| 173 | + return $installationPath.'/'.substr($path, 2); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - return $installationPath . '/' . ltrim($path, '/'); |
|
| 176 | + return $installationPath.'/'.ltrim($path, '/'); |
|
| 177 | 177 | }; |
| 178 | 178 | } |
| 179 | 179 | |