@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | self::assertSame( |
| 31 | 31 | $expectedMessages, |
| 32 | - array_map(function (Change $change) : string { |
|
| 32 | + array_map(function(Change $change) : string { |
|
| 33 | 33 | return $change->__toString(); |
| 34 | 34 | }, iterator_to_array($changes)) |
| 35 | 35 | ); |
@@ -43,11 +43,11 @@ discard block |
||
| 43 | 43 | return [ |
| 44 | 44 | 'RoaveTestAsset\\ClassWithConstantsBeingRemoved' => [ |
| 45 | 45 | (new ClassReflector(new SingleFileSourceLocator( |
| 46 | - __DIR__ . '/../../../../asset/api/old/ClassWithConstantsBeingRemoved.php', |
|
| 46 | + __DIR__.'/../../../../asset/api/old/ClassWithConstantsBeingRemoved.php', |
|
| 47 | 47 | $locator |
| 48 | 48 | )))->reflect('RoaveTestAsset\\ClassWithConstantsBeingRemoved'), |
| 49 | 49 | (new ClassReflector(new SingleFileSourceLocator( |
| 50 | - __DIR__ . '/../../../../asset/api/new/ClassWithConstantsBeingRemoved.php', |
|
| 50 | + __DIR__.'/../../../../asset/api/new/ClassWithConstantsBeingRemoved.php', |
|
| 51 | 51 | $locator |
| 52 | 52 | )))->reflect('RoaveTestAsset\\ClassWithConstantsBeingRemoved'), |
| 53 | 53 | [ |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | self::assertSame( |
| 33 | 33 | $expectedMessages, |
| 34 | - array_map(function (Change $change) : string { |
|
| 34 | + array_map(function(Change $change) : string { |
|
| 35 | 35 | return $change->__toString(); |
| 36 | 36 | }, iterator_to_array($changes)) |
| 37 | 37 | ); |
@@ -45,11 +45,11 @@ discard block |
||
| 45 | 45 | return [ |
| 46 | 46 | 'RoaveTestAsset\\ClassWithPropertiesBeingRemoved' => [ |
| 47 | 47 | (new ClassReflector(new SingleFileSourceLocator( |
| 48 | - __DIR__ . '/../../../../asset/api/old/ClassWithPropertiesBeingRemoved.php', |
|
| 48 | + __DIR__.'/../../../../asset/api/old/ClassWithPropertiesBeingRemoved.php', |
|
| 49 | 49 | $locator |
| 50 | 50 | )))->reflect('RoaveTestAsset\\ClassWithPropertiesBeingRemoved'), |
| 51 | 51 | (new ClassReflector(new SingleFileSourceLocator( |
| 52 | - __DIR__ . '/../../../../asset/api/new/ClassWithPropertiesBeingRemoved.php', |
|
| 52 | + __DIR__.'/../../../../asset/api/new/ClassWithPropertiesBeingRemoved.php', |
|
| 53 | 53 | $locator |
| 54 | 54 | )))->reflect('RoaveTestAsset\\ClassWithPropertiesBeingRemoved'), |
| 55 | 55 | [ |
@@ -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 | } |
@@ -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()); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | public function setUp() : void |
| 67 | 67 | { |
| 68 | - $this->sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../../')); |
|
| 68 | + $this->sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__.'/../../../')); |
|
| 69 | 69 | chdir((string) $this->sourceRepository); |
| 70 | 70 | |
| 71 | 71 | $this->input = $this->createMock(InputInterface::class); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | $this->output->expects(self::any()) |
| 226 | 226 | ->method('writeln') |
| 227 | - ->willReturnCallback(function (string $output) use ($changeToExpect) : void { |
|
| 227 | + ->willReturnCallback(function(string $output) use ($changeToExpect) : void { |
|
| 228 | 228 | self::assertContains($changeToExpect, $output); |
| 229 | 229 | }); |
| 230 | 230 | } |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | |
| 272 | 272 | $this->getVersions->expects(self::once()) |
| 273 | 273 | ->method('fromRepository') |
| 274 | - ->with(self::callback(function (CheckedOutRepository $checkedOutRepository) : bool { |
|
| 274 | + ->with(self::callback(function(CheckedOutRepository $checkedOutRepository) : bool { |
|
| 275 | 275 | self::assertEquals($this->sourceRepository, $checkedOutRepository); |
| 276 | 276 | return true; |
| 277 | 277 | })) |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | return array_merge( |
| 236 | 236 | [[null]], |
| 237 | 237 | array_merge(...array_map( |
| 238 | - function (string $type) use ($reflector) : array { |
|
| 238 | + function(string $type) use ($reflector) : array { |
|
| 239 | 239 | return [ |
| 240 | 240 | [ReflectionType::createFromTypeAndReflector($type, false, $reflector)], |
| 241 | 241 | [ReflectionType::createFromTypeAndReflector($type, true, $reflector)], |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | /** @dataProvider existingNullableTypeStrings */ |
| 260 | 260 | public function testCovarianceConsidersNullability(string $type) : void |
| 261 | 261 | { |
| 262 | - $reflector = new ClassReflector(new StringSourceLocator( |
|
| 262 | + $reflector = new ClassReflector(new StringSourceLocator( |
|
| 263 | 263 | <<<'PHP' |
| 264 | 264 | <?php |
| 265 | 265 | |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | return array_merge( |
| 225 | 225 | [[null]], |
| 226 | 226 | array_merge(...array_map( |
| 227 | - function (string $type) use ($reflector) : array { |
|
| 227 | + function(string $type) use ($reflector) : array { |
|
| 228 | 228 | return [ |
| 229 | 229 | [ReflectionType::createFromTypeAndReflector($type, false, $reflector)], |
| 230 | 230 | [ReflectionType::createFromTypeAndReflector($type, true, $reflector)], |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | /** @dataProvider existingNullableTypeStrings */ |
| 249 | 249 | public function testContravarianceConsidersNullability(string $type) : void |
| 250 | 250 | { |
| 251 | - $reflector = new ClassReflector(new StringSourceLocator( |
|
| 251 | + $reflector = new ClassReflector(new StringSourceLocator( |
|
| 252 | 252 | <<<'PHP' |
| 253 | 253 | <?php |
| 254 | 254 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | self::assertSame( |
| 36 | 36 | $expectedMessages, |
| 37 | - array_map(function (Change $change) : string { |
|
| 37 | + array_map(function(Change $change) : string { |
|
| 38 | 38 | return $change->__toString(); |
| 39 | 39 | }, iterator_to_array($changes)) |
| 40 | 40 | ); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | return array_combine( |
| 113 | 113 | 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), |