@@ -124,23 +124,23 @@ |
||
| 124 | 124 | $toPath = $this->git->checkout($sourceRepo, $toRevision); |
| 125 | 125 | |
| 126 | 126 | try { |
| 127 | - $fromSources = $fromPath . '/' . $sourcesPath; |
|
| 128 | - $toSources = $toPath . '/' . $sourcesPath; |
|
| 127 | + $fromSources = $fromPath.'/'.$sourcesPath; |
|
| 128 | + $toSources = $toPath.'/'.$sourcesPath; |
|
| 129 | 129 | |
| 130 | 130 | Assert::that($fromSources)->directory(); |
| 131 | 131 | Assert::that($toSources)->directory(); |
| 132 | 132 | |
| 133 | 133 | $changes = $this->comparator->compare( |
| 134 | 134 | $this->reflectorFactory->__invoke( |
| 135 | - $fromPath . '/' . $sourcesPath, |
|
| 135 | + $fromPath.'/'.$sourcesPath, |
|
| 136 | 136 | new AggregateSourceLocator() // no dependencies |
| 137 | 137 | ), |
| 138 | 138 | $this->reflectorFactory->__invoke( |
| 139 | - $fromPath . '/' . $sourcesPath, |
|
| 139 | + $fromPath.'/'.$sourcesPath, |
|
| 140 | 140 | $this->locateDependencies->__invoke((string) $fromPath) |
| 141 | 141 | ), |
| 142 | 142 | $this->reflectorFactory->__invoke( |
| 143 | - $toPath . '/' . $sourcesPath, |
|
| 143 | + $toPath.'/'.$sourcesPath, |
|
| 144 | 144 | $this->locateDependencies->__invoke((string) $toPath) |
| 145 | 145 | ) |
| 146 | 146 | ); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function checkout(CheckedOutRepository $sourceRepository, Revision $revision) : CheckedOutRepository |
| 18 | 18 | { |
| 19 | - $checkoutDirectory = sys_get_temp_dir() . '/api-compare-' . (string) $revision; |
|
| 19 | + $checkoutDirectory = sys_get_temp_dir().'/api-compare-'.(string) $revision; |
|
| 20 | 20 | |
| 21 | 21 | (new Process(['git', 'clone', (string) $sourceRepository, $checkoutDirectory]))->mustRun(); |
| 22 | 22 | (new Process(['git', 'checkout', (string) $revision]))->setWorkingDirectory($checkoutDirectory)->mustRun(); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | // @todo handle invalid versions more gracefully (drop them) |
| 32 | 32 | return VersionsCollection::fromArray(array_filter( |
| 33 | 33 | explode("\n", $output), |
| 34 | - function (string $maybeVersion) { |
|
| 34 | + function(string $maybeVersion) { |
|
| 35 | 35 | return trim($maybeVersion) !== ''; |
| 36 | 36 | } |
| 37 | 37 | )); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | public static function fromPath(string $path) : self |
| 19 | 19 | { |
| 20 | 20 | Assert::that($path)->directory(); |
| 21 | - Assert::that($path . '/.git')->directory(); |
|
| 21 | + Assert::that($path.'/.git')->directory(); |
|
| 22 | 22 | $instance = new self(); |
| 23 | 23 | $instance->path = $path; |
| 24 | 24 | return $instance; |
@@ -76,9 +76,9 @@ discard block |
||
| 76 | 76 | $classMap = $classMapProperty->getDefaultValue(); |
| 77 | 77 | |
| 78 | 78 | Assert::that($classMap) |
| 79 | - ->isArray() |
|
| 80 | - ->all() |
|
| 81 | - ->file(); |
|
| 79 | + ->isArray() |
|
| 80 | + ->all() |
|
| 81 | + ->file(); |
|
| 82 | 82 | |
| 83 | 83 | return new StaticClassMapSourceLocator($classMap, $this->astLocator); |
| 84 | 84 | } |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | $filesMap = $filesMapProperty->getDefaultValue(); |
| 93 | 93 | |
| 94 | 94 | Assert::that($filesMap) |
| 95 | - ->isArray() |
|
| 96 | - ->all() |
|
| 97 | - ->file(); |
|
| 95 | + ->isArray() |
|
| 96 | + ->all() |
|
| 97 | + ->file(); |
|
| 98 | 98 | |
| 99 | 99 | return new AggregateSourceLocator(array_values(array_map( |
| 100 | 100 | function (string $path) : SourceLocator { |
@@ -48,13 +48,13 @@ discard block |
||
| 48 | 48 | public function __invoke(string $installationPath) : SourceLocator |
| 49 | 49 | { |
| 50 | 50 | Assert::that($installationPath)->directory(); |
| 51 | - Assert::that($installationPath . '/composer.json')->file(); |
|
| 51 | + Assert::that($installationPath.'/composer.json')->file(); |
|
| 52 | 52 | |
| 53 | - $this->runInDirectory(function () : void { |
|
| 53 | + $this->runInDirectory(function() : void { |
|
| 54 | 54 | $this->installer->run(); |
| 55 | 55 | }, $installationPath); |
| 56 | 56 | |
| 57 | - $autoloadStatic = $installationPath . '/vendor/composer/autoload_static.php'; |
|
| 57 | + $autoloadStatic = $installationPath.'/vendor/composer/autoload_static.php'; |
|
| 58 | 58 | |
| 59 | 59 | Assert::that($autoloadStatic)->file(); |
| 60 | 60 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | ->file(); |
| 108 | 108 | |
| 109 | 109 | return new AggregateSourceLocator(array_values(array_map( |
| 110 | - function (string $path) : SourceLocator { |
|
| 110 | + function(string $path) : SourceLocator { |
|
| 111 | 111 | return new SingleFileSourceLocator( |
| 112 | 112 | realpath($path), |
| 113 | 113 | $this->astLocator |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $this->accessibleConstants($toClass) |
| 22 | 22 | ); |
| 23 | 23 | |
| 24 | - return Changes::fromArray(array_values(array_map(function (ReflectionClassConstant $constant) use ($fromClass) : Change { |
|
| 24 | + return Changes::fromArray(array_values(array_map(function(ReflectionClassConstant $constant) use ($fromClass) : Change { |
|
| 25 | 25 | return Change::removed( |
| 26 | 26 | sprintf('Constant %s::%s was removed', $fromClass->getName(), $constant->getName()), |
| 27 | 27 | true |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** @return ReflectionClassConstant[] */ |
| 33 | 33 | private function accessibleConstants(ReflectionClass $class) : array |
| 34 | 34 | { |
| 35 | - return array_filter($class->getReflectionConstants(), function (ReflectionClassConstant $constant) : bool { |
|
| 35 | + return array_filter($class->getReflectionConstants(), function(ReflectionClassConstant $constant) : bool { |
|
| 36 | 36 | return $constant->isPublic() || $constant->isProtected(); |
| 37 | 37 | }); |
| 38 | 38 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | protected function createLocatedSource(Identifier $identifier) : ?LocatedSource |
| 36 | 36 | { |
| 37 | - if (! $identifier->isClass()) { |
|
| 37 | + if (!$identifier->isClass()) { |
|
| 38 | 38 | return null; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -20,9 +20,9 @@ |
||
| 20 | 20 | use Symfony\Component\Console\Application; |
| 21 | 21 | use function file_exists; |
| 22 | 22 | |
| 23 | -(function () : void { |
|
| 24 | - foreach ([__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../autoload.php'] as $autoload) { |
|
| 25 | - if (! file_exists($autoload)) { |
|
| 23 | +(function() : void { |
|
| 24 | + foreach ([__DIR__.'/../vendor/autoload.php', __DIR__.'/../autoload.php'] as $autoload) { |
|
| 25 | + if (!file_exists($autoload)) { |
|
| 26 | 26 | continue; |
| 27 | 27 | } |
| 28 | 28 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | { |
| 18 | 18 | $changeText = uniqid('changeText', true); |
| 19 | 19 | $change = Change::added($changeText, false); |
| 20 | - self::assertSame(' ADDED: ' . $changeText, (string) $change); |
|
| 20 | + self::assertSame(' ADDED: '.$changeText, (string) $change); |
|
| 21 | 21 | self::assertTrue($change->isAdded()); |
| 22 | 22 | self::assertFalse($change->isChanged()); |
| 23 | 23 | self::assertFalse($change->isRemoved()); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $changeText = uniqid('changeText', true); |
| 29 | 29 | $change = Change::added($changeText, true); |
| 30 | - self::assertSame('[BC] ADDED: ' . $changeText, (string) $change); |
|
| 30 | + self::assertSame('[BC] ADDED: '.$changeText, (string) $change); |
|
| 31 | 31 | self::assertTrue($change->isAdded()); |
| 32 | 32 | self::assertFalse($change->isChanged()); |
| 33 | 33 | self::assertFalse($change->isRemoved()); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $changeText = uniqid('changeText', true); |
| 39 | 39 | $change = Change::changed($changeText, false); |
| 40 | - self::assertSame(' CHANGED: ' . $changeText, (string) $change); |
|
| 40 | + self::assertSame(' CHANGED: '.$changeText, (string) $change); |
|
| 41 | 41 | self::assertFalse($change->isAdded()); |
| 42 | 42 | self::assertTrue($change->isChanged()); |
| 43 | 43 | self::assertFalse($change->isRemoved()); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | { |
| 48 | 48 | $changeText = uniqid('changeText', true); |
| 49 | 49 | $change = Change::changed($changeText, true); |
| 50 | - self::assertSame('[BC] CHANGED: ' . $changeText, (string) $change); |
|
| 50 | + self::assertSame('[BC] CHANGED: '.$changeText, (string) $change); |
|
| 51 | 51 | self::assertFalse($change->isAdded()); |
| 52 | 52 | self::assertTrue($change->isChanged()); |
| 53 | 53 | self::assertFalse($change->isRemoved()); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | $changeText = uniqid('changeText', true); |
| 59 | 59 | $change = Change::removed($changeText, false); |
| 60 | - self::assertSame(' REMOVED: ' . $changeText, (string) $change); |
|
| 60 | + self::assertSame(' REMOVED: '.$changeText, (string) $change); |
|
| 61 | 61 | self::assertFalse($change->isAdded()); |
| 62 | 62 | self::assertFalse($change->isChanged()); |
| 63 | 63 | self::assertTrue($change->isRemoved()); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $changeText = uniqid('changeText', true); |
| 69 | 69 | $change = Change::removed($changeText, true); |
| 70 | - self::assertSame('[BC] REMOVED: ' . $changeText, (string) $change); |
|
| 70 | + self::assertSame('[BC] REMOVED: '.$changeText, (string) $change); |
|
| 71 | 71 | self::assertFalse($change->isAdded()); |
| 72 | 72 | self::assertFalse($change->isChanged()); |
| 73 | 73 | self::assertTrue($change->isRemoved()); |