@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | { |
20 | 20 | public function testFromPath() : void |
21 | 21 | { |
22 | - $path = sys_get_temp_dir() . '/' . uniqid('testPath', true); |
|
22 | + $path = sys_get_temp_dir().'/'.uniqid('testPath', true); |
|
23 | 23 | mkdir($path, 0777, true); |
24 | - mkdir($path . '/.git'); |
|
24 | + mkdir($path.'/.git'); |
|
25 | 25 | |
26 | 26 | $checkedOutRepository = CheckedOutRepository::fromPath($path); |
27 | 27 | self::assertSame($path, (string) $checkedOutRepository); |
28 | 28 | |
29 | - rmdir($path . '/.git'); |
|
29 | + rmdir($path.'/.git'); |
|
30 | 30 | rmdir($path); |
31 | 31 | } |
32 | 32 | |
@@ -41,6 +41,6 @@ discard block |
||
41 | 41 | { |
42 | 42 | $this->expectException(AssertionFailedException::class); |
43 | 43 | |
44 | - CheckedOutRepository::fromPath(__DIR__ . '/non-existing'); |
|
44 | + CheckedOutRepository::fromPath(__DIR__.'/non-existing'); |
|
45 | 45 | } |
46 | 46 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | ->getOutput() |
83 | 83 | ); |
84 | 84 | |
85 | - file_put_contents($repoPath . '/a-file.txt', 'file contents'); |
|
85 | + file_put_contents($repoPath.'/a-file.txt', 'file contents'); |
|
86 | 86 | |
87 | 87 | (new Process(['git', 'add', 'a-file.txt'], $repoPath)) |
88 | 88 | ->mustRun(); |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | $first = $git->checkout($sourceRepository, $firstCommit); |
103 | 103 | $second = $git->checkout($sourceRepository, $secondCommit); |
104 | 104 | |
105 | - self::assertFileNotExists($first->__toString() . '/a-file.txt'); |
|
106 | - self::assertFileExists($second->__toString() . '/a-file.txt'); |
|
105 | + self::assertFileNotExists($first->__toString().'/a-file.txt'); |
|
106 | + self::assertFileExists($second->__toString().'/a-file.txt'); |
|
107 | 107 | |
108 | 108 | $git->remove($first); |
109 | 109 | $git->remove($second); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | public function testExceptionIsThrownWhenTwoPathsCollide() : void |
115 | 115 | { |
116 | - $git = new GitCheckoutRevisionToTemporaryPath(static function () : string { |
|
116 | + $git = new GitCheckoutRevisionToTemporaryPath(static function() : string { |
|
117 | 117 | return 'foo'; |
118 | 118 | }); |
119 | 119 | $sourceRepository = $this->sourceRepository(); |
@@ -141,6 +141,6 @@ discard block |
||
141 | 141 | |
142 | 142 | private function sourceRepository() : CheckedOutRepository |
143 | 143 | { |
144 | - return CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../..')); |
|
144 | + return CheckedOutRepository::fromPath(realpath(__DIR__.'/../../..')); |
|
145 | 145 | } |
146 | 146 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | $output->expects(self::once()) |
38 | 38 | ->method('writeln') |
39 | - ->willReturnCallback(static function (string $output) use ($changeToExpect) : void { |
|
39 | + ->willReturnCallback(static function(string $output) use ($changeToExpect) : void { |
|
40 | 40 | self::assertStringContainsString($changeToExpect, $output); |
41 | 41 | }); |
42 | 42 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $this->originalCwd = getcwd(); |
48 | 48 | $this->composerInstaller = $this->createMock(Installer::class); |
49 | 49 | $this->astLocator = (new BetterReflection())->astLocator(); |
50 | - $this->makeInstaller = function (string $installationPath) : Installer { |
|
50 | + $this->makeInstaller = function(string $installationPath) : Installer { |
|
51 | 51 | self::assertSame($this->expectedInstallatonPath, $installationPath); |
52 | 52 | |
53 | 53 | return $this->composerInstaller; |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | |
75 | 75 | $this |
76 | 76 | ->locateDependencies |
77 | - ->__invoke(__DIR__ . '/non-existing'); |
|
77 | + ->__invoke(__DIR__.'/non-existing'); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | public function testWillLocateDependencies() : void |
81 | 81 | { |
82 | - $this->expectedInstallatonPath = realpath(__DIR__ . '/../../asset/composer-installation-structure'); |
|
82 | + $this->expectedInstallatonPath = realpath(__DIR__.'/../../asset/composer-installation-structure'); |
|
83 | 83 | |
84 | 84 | $this |
85 | 85 | ->composerInstaller |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | ->composerInstaller |
107 | 107 | ->expects(self::once()) |
108 | 108 | ->method('run') |
109 | - ->willReturnCallback(function () : void { |
|
109 | + ->willReturnCallback(function() : void { |
|
110 | 110 | self::assertSame($this->expectedInstallatonPath, getcwd()); |
111 | 111 | }); |
112 | 112 |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | return array_merge( |
233 | 233 | [[null]], |
234 | 234 | array_merge(...array_map( |
235 | - static function (string $type) use ($reflector) : array { |
|
235 | + static function(string $type) use ($reflector) : array { |
|
236 | 236 | return [ |
237 | 237 | [ReflectionType::createFromTypeAndReflector($type, false, $reflector)], |
238 | 238 | [ReflectionType::createFromTypeAndReflector($type, true, $reflector)], |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function testContravarianceConsidersNullability(string $type) : void |
260 | 260 | { |
261 | - $reflector = new ClassReflector(new StringSourceLocator( |
|
261 | + $reflector = new ClassReflector(new StringSourceLocator( |
|
262 | 262 | <<<'PHP' |
263 | 263 | <?php |
264 | 264 |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | return array_merge( |
244 | 244 | [[null]], |
245 | 245 | array_merge(...array_map( |
246 | - static function (string $type) use ($reflector) : array { |
|
246 | + static function(string $type) use ($reflector) : array { |
|
247 | 247 | return [ |
248 | 248 | [ReflectionType::createFromTypeAndReflector($type, false, $reflector)], |
249 | 249 | [ReflectionType::createFromTypeAndReflector($type, true, $reflector)], |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | */ |
270 | 270 | public function testCovarianceConsidersNullability(string $type) : void |
271 | 271 | { |
272 | - $reflector = new ClassReflector(new StringSourceLocator( |
|
272 | + $reflector = new ClassReflector(new StringSourceLocator( |
|
273 | 273 | <<<'PHP' |
274 | 274 | <?php |
275 | 275 |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | public function setUp() : void |
77 | 77 | { |
78 | - $repositoryPath = realpath(__DIR__ . '/../../../'); |
|
78 | + $repositoryPath = realpath(__DIR__.'/../../../'); |
|
79 | 79 | |
80 | 80 | $this->sourceRepository = CheckedOutRepository::fromPath($repositoryPath); |
81 | 81 | |
@@ -290,8 +290,8 @@ discard block |
||
290 | 290 | $this->output |
291 | 291 | ->expects(self::once()) |
292 | 292 | ->method('writeln') |
293 | - ->willReturnCallback(static function (string $output) use ($changeToExpect) : void { |
|
294 | - self::assertStringContainsString(' [BC] ' . $changeToExpect, $output); |
|
293 | + ->willReturnCallback(static function(string $output) use ($changeToExpect) : void { |
|
294 | + self::assertStringContainsString(' [BC] '.$changeToExpect, $output); |
|
295 | 295 | }); |
296 | 296 | |
297 | 297 | $this->compare->execute($this->input, $this->output); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | |
379 | 379 | $this->getVersions->expects(self::once()) |
380 | 380 | ->method('fromRepository') |
381 | - ->with(self::callback(function (CheckedOutRepository $checkedOutRepository) : bool { |
|
381 | + ->with(self::callback(function(CheckedOutRepository $checkedOutRepository) : bool { |
|
382 | 382 | self::assertEquals($this->sourceRepository, $checkedOutRepository); |
383 | 383 | |
384 | 384 | return true; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | public static function fromPath(string $path) : self |
19 | 19 | { |
20 | - Assert::that($path . '/.git')->directory(); |
|
20 | + Assert::that($path.'/.git')->directory(); |
|
21 | 21 | $instance = new self(); |
22 | 22 | $instance->path = $path; |
23 | 23 |
@@ -18,10 +18,10 @@ |
||
18 | 18 | /** @var string[] */ |
19 | 19 | private $classMap; |
20 | 20 | |
21 | - /** |
|
22 | - * @param array<string, string> $classMap map of class => file. Every file must exist, |
|
23 | - * every key must be non-empty |
|
24 | - */ |
|
21 | + /** |
|
22 | + * @param array<string, string> $classMap map of class => file. Every file must exist, |
|
23 | + * every key must be non-empty |
|
24 | + */ |
|
25 | 25 | public function __construct( |
26 | 26 | array $classMap, |
27 | 27 | Locator $astLocator |
@@ -39,7 +39,7 @@ |
||
39 | 39 | |
40 | 40 | protected function createLocatedSource(Identifier $identifier) : ?LocatedSource |
41 | 41 | { |
42 | - if (! $identifier->isClass()) { |
|
42 | + if (!$identifier->isClass()) { |
|
43 | 43 | return null; |
44 | 44 | } |
45 | 45 |