@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | self::assertSame( |
| 35 | 35 | $expectedMessages, |
| 36 | - array_map(static function (Change $change) : string { |
|
| 36 | + array_map(static function(Change $change) : string { |
|
| 37 | 37 | return $change->__toString(); |
| 38 | 38 | }, iterator_to_array($changes)) |
| 39 | 39 | ); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | , |
| 64 | 64 | $locator |
| 65 | 65 | )); |
| 66 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 66 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 67 | 67 | <<<'PHP' |
| 68 | 68 | <?php |
| 69 | 69 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | return array_combine( |
| 103 | 103 | array_keys($classes), |
| 104 | 104 | array_map( |
| 105 | - static function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
| 105 | + static function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
| 106 | 106 | return [ |
| 107 | 107 | $fromReflector->reflect($className), |
| 108 | 108 | $toReflector->reflect($className), |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | self::assertSame( |
| 35 | 35 | $expectedMessages, |
| 36 | - array_map(static function (Change $change) : string { |
|
| 36 | + array_map(static function(Change $change) : string { |
|
| 37 | 37 | return $change->__toString(); |
| 38 | 38 | }, iterator_to_array($changes)) |
| 39 | 39 | ); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | , |
| 64 | 64 | $locator |
| 65 | 65 | )); |
| 66 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 66 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 67 | 67 | <<<'PHP' |
| 68 | 68 | <?php |
| 69 | 69 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | return array_combine( |
| 103 | 103 | array_keys($classes), |
| 104 | 104 | array_map( |
| 105 | - static function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
| 105 | + static function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
| 106 | 106 | return [ |
| 107 | 107 | $fromReflector->reflect($className), |
| 108 | 108 | $toReflector->reflect($className), |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | self::assertSame( |
| 35 | 35 | $expectedMessages, |
| 36 | - array_map(static function (Change $change) : string { |
|
| 36 | + array_map(static function(Change $change) : string { |
|
| 37 | 37 | return $change->__toString(); |
| 38 | 38 | }, iterator_to_array($changes)) |
| 39 | 39 | ); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | , |
| 64 | 64 | $locator |
| 65 | 65 | )); |
| 66 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 66 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 67 | 67 | <<<'PHP' |
| 68 | 68 | <?php |
| 69 | 69 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | return array_combine( |
| 103 | 103 | array_keys($classes), |
| 104 | 104 | array_map( |
| 105 | - static function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
| 105 | + static function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
| 106 | 106 | return [ |
| 107 | 107 | $fromReflector->reflect($className), |
| 108 | 108 | $toReflector->reflect($className), |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | self::assertSame( |
| 35 | 35 | $expectedMessages, |
| 36 | - array_map(static function (Change $change) : string { |
|
| 36 | + array_map(static function(Change $change) : string { |
|
| 37 | 37 | return $change->__toString(); |
| 38 | 38 | }, iterator_to_array($changes)) |
| 39 | 39 | ); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | , |
| 64 | 64 | $locator |
| 65 | 65 | )); |
| 66 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 66 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 67 | 67 | <<<'PHP' |
| 68 | 68 | <?php |
| 69 | 69 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | return array_combine( |
| 103 | 103 | array_keys($classes), |
| 104 | 104 | array_map( |
| 105 | - static function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
| 105 | + static function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
| 106 | 106 | return [ |
| 107 | 107 | $fromReflector->reflect($className), |
| 108 | 108 | $toReflector->reflect($className), |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | self::assertSame( |
| 39 | 39 | $expectedMessages, |
| 40 | - array_map(static function (Change $change) : string { |
|
| 40 | + array_map(static function(Change $change) : string { |
|
| 41 | 41 | return $change->__toString(); |
| 42 | 42 | }, iterator_to_array($changes)) |
| 43 | 43 | ); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | return array_combine( |
| 124 | 124 | array_keys($properties), |
| 125 | 125 | array_map( |
| 126 | - static function (string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 126 | + static function(string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 127 | 127 | return [ |
| 128 | 128 | $fromClass->getMethod($methodName), |
| 129 | 129 | $toClass->getMethod($methodName), |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | self::assertSame( |
| 39 | 39 | $expectedMessages, |
| 40 | - array_map(static function (Change $change) : string { |
|
| 40 | + array_map(static function(Change $change) : string { |
|
| 41 | 41 | return $change->__toString(); |
| 42 | 42 | }, iterator_to_array($changes)) |
| 43 | 43 | ); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | return array_combine( |
| 124 | 124 | array_keys($properties), |
| 125 | 125 | array_map( |
| 126 | - static function (string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 126 | + static function(string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 127 | 127 | return [ |
| 128 | 128 | $fromClass->getMethod($methodName), |
| 129 | 129 | $toClass->getMethod($methodName), |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | self::assertSame( |
| 37 | 37 | $expectedMessages, |
| 38 | - array_map(function (Change $change) : string { |
|
| 38 | + array_map(function(Change $change) : string { |
|
| 39 | 39 | return $change->__toString(); |
| 40 | 40 | }, iterator_to_array($changes)) |
| 41 | 41 | ); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | return array_combine(array_keys($properties), |
| 114 | 114 | array_map( |
| 115 | - function (string $constant, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 115 | + function(string $constant, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 116 | 116 | return [ |
| 117 | 117 | $fromClass->getReflectionConstant($constant), |
| 118 | 118 | $toClass->getReflectionConstant($constant), |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | (new Process(['git', 'add', '-A'], $this->sourcesRepository))->mustRun(); |
| 140 | 140 | (new Process(['git', 'commit', '-am', sprintf('Class sources v%d', $key + 1)], $this->sourcesRepository))->mustRun(); |
| 141 | 141 | $this->versions[$key] = trim((new Process(['git', 'rev-parse', 'HEAD'], $this->sourcesRepository))->mustRun() |
| 142 | - ->getOutput()); |
|
| 142 | + ->getOutput()); |
|
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
@@ -121,20 +121,20 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | unlink($this->sourcesRepository); |
| 123 | 123 | mkdir($this->sourcesRepository); |
| 124 | - mkdir($this->sourcesRepository . '/src'); |
|
| 124 | + mkdir($this->sourcesRepository.'/src'); |
|
| 125 | 125 | |
| 126 | 126 | self::assertDirectoryExists($this->sourcesRepository); |
| 127 | - self::assertDirectoryExists($this->sourcesRepository . '/src'); |
|
| 127 | + self::assertDirectoryExists($this->sourcesRepository.'/src'); |
|
| 128 | 128 | |
| 129 | 129 | (new Process(['git', 'init'], $this->sourcesRepository))->mustRun(); |
| 130 | 130 | |
| 131 | - file_put_contents($this->sourcesRepository . '/composer.json', self::COMPOSER_MANIFEST); |
|
| 131 | + file_put_contents($this->sourcesRepository.'/composer.json', self::COMPOSER_MANIFEST); |
|
| 132 | 132 | |
| 133 | 133 | (new Process(['git', 'add', '-A'], $this->sourcesRepository))->mustRun(); |
| 134 | 134 | (new Process(['git', 'commit', '-am', 'Initial commit with composer manifest'], $this->sourcesRepository))->mustRun(); |
| 135 | 135 | |
| 136 | 136 | foreach (self::CLASS_VERSIONS as $key => $classCode) { |
| 137 | - file_put_contents($this->sourcesRepository . '/src/TheClass.php', $classCode); |
|
| 137 | + file_put_contents($this->sourcesRepository.'/src/TheClass.php', $classCode); |
|
| 138 | 138 | |
| 139 | 139 | (new Process(['git', 'add', '-A'], $this->sourcesRepository))->mustRun(); |
| 140 | 140 | (new Process(['git', 'commit', '-am', sprintf('Class sources v%d', $key + 1)], $this->sourcesRepository))->mustRun(); |
@@ -158,9 +158,9 @@ discard block |
||
| 158 | 158 | { |
| 159 | 159 | $check = new Process( |
| 160 | 160 | [ |
| 161 | - __DIR__ . '/../../../bin/roave-backward-compatibility-check', |
|
| 162 | - '--from=' . $this->versions[0], |
|
| 163 | - '--to=' . $this->versions[1], |
|
| 161 | + __DIR__.'/../../../bin/roave-backward-compatibility-check', |
|
| 162 | + '--from='.$this->versions[0], |
|
| 163 | + '--to='.$this->versions[1], |
|
| 164 | 164 | ], |
| 165 | 165 | $this->sourcesRepository |
| 166 | 166 | ); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | public function testWillNotRunWithoutTagsNorSpecifiedVersions() : void |
| 181 | 181 | { |
| 182 | 182 | $check = new Process( |
| 183 | - [__DIR__ . '/../../../bin/roave-backward-compatibility-check'], |
|
| 183 | + [__DIR__.'/../../../bin/roave-backward-compatibility-check'], |
|
| 184 | 184 | $this->sourcesRepository |
| 185 | 185 | ); |
| 186 | 186 | |
@@ -195,9 +195,9 @@ discard block |
||
| 195 | 195 | { |
| 196 | 196 | $check = new Process( |
| 197 | 197 | [ |
| 198 | - __DIR__ . '/../../../bin/roave-backward-compatibility-check', |
|
| 199 | - '--from=' . $this->versions[0], |
|
| 200 | - '--to=' . $this->versions[3], |
|
| 198 | + __DIR__.'/../../../bin/roave-backward-compatibility-check', |
|
| 199 | + '--from='.$this->versions[0], |
|
| 200 | + '--to='.$this->versions[3], |
|
| 201 | 201 | '-vvv', |
| 202 | 202 | ], |
| 203 | 203 | $this->sourcesRepository |
@@ -216,8 +216,8 @@ discard block |
||
| 216 | 216 | |
| 217 | 217 | $check = new Process( |
| 218 | 218 | [ |
| 219 | - __DIR__ . '/../../../bin/roave-backward-compatibility-check', |
|
| 220 | - '--to=' . $this->versions[2], |
|
| 219 | + __DIR__.'/../../../bin/roave-backward-compatibility-check', |
|
| 220 | + '--to='.$this->versions[2], |
|
| 221 | 221 | ], |
| 222 | 222 | $this->sourcesRepository |
| 223 | 223 | ); |
@@ -245,8 +245,8 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | $check = new Process( |
| 247 | 247 | [ |
| 248 | - __DIR__ . '/../../../bin/roave-backward-compatibility-check', |
|
| 249 | - '--to=' . $this->versions[2], |
|
| 248 | + __DIR__.'/../../../bin/roave-backward-compatibility-check', |
|
| 249 | + '--to='.$this->versions[2], |
|
| 250 | 250 | ], |
| 251 | 251 | $this->sourcesRepository |
| 252 | 252 | ); |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | 'tag', |
| 285 | 285 | $tagName, |
| 286 | 286 | '-m', |
| 287 | - 'A tag for version ' . $version, |
|
| 287 | + 'A tag for version '.$version, |
|
| 288 | 288 | ], |
| 289 | 289 | $this->sourcesRepository |
| 290 | 290 | ))->mustRun(); |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | public function setUp() : void |
| 28 | 28 | { |
| 29 | - $tmpGitRepo = sys_get_temp_dir() . '/api-compare-' . uniqid('tmpGitRepo', true); |
|
| 29 | + $tmpGitRepo = sys_get_temp_dir().'/api-compare-'.uniqid('tmpGitRepo', true); |
|
| 30 | 30 | mkdir($tmpGitRepo, 0777, true); |
| 31 | 31 | (new Process(['git', 'init']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
| 32 | - file_put_contents($tmpGitRepo . '/test', uniqid('testContent', true)); |
|
| 32 | + file_put_contents($tmpGitRepo.'/test', uniqid('testContent', true)); |
|
| 33 | 33 | (new Process(['git', 'add', '.']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
| 34 | 34 | (new Process(['git', 'commit', '-m', '"whatever"']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
| 35 | 35 | $this->repoPath = CheckedOutRepository::fromPath($tmpGitRepo); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | private function getTags() : array |
| 50 | 50 | { |
| 51 | 51 | return array_map( |
| 52 | - static function (Version $version) : string { |
|
| 52 | + static function(Version $version) : string { |
|
| 53 | 53 | return $version->getVersionString(); |
| 54 | 54 | }, |
| 55 | 55 | iterator_to_array((new GetVersionCollectionFromGitRepository())->fromRepository($this->repoPath)) |