@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Roave\ApiCompare\Comparator\BackwardsCompatibility\ClassBased; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Roave\ApiCompare\Comparator\BackwardsCompatibility\ClassBased; |
| 6 | 6 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | array_keys($this->accessibleProperties($toClass)) |
| 22 | 22 | ); |
| 23 | 23 | |
| 24 | - return Changes::fromArray(array_values(array_map(function (string $property) use ($fromClass) : Change { |
|
| 24 | + return Changes::fromArray(array_values(array_map(function(string $property) use ($fromClass) : Change { |
|
| 25 | 25 | return Change::removed( |
| 26 | 26 | sprintf('Property %s#%s was removed', $fromClass->getName(), $property), |
| 27 | 27 | true |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** @return ReflectionProperty[] */ |
| 33 | 33 | private function accessibleProperties(ReflectionClass $class) : array |
| 34 | 34 | { |
| 35 | - return array_filter($class->getProperties(), function (ReflectionProperty $property) : bool { |
|
| 35 | + return array_filter($class->getProperties(), function(ReflectionProperty $property) : bool { |
|
| 36 | 36 | return $property->isPublic() || $property->isProtected(); |
| 37 | 37 | }); |
| 38 | 38 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassBased; |
| 6 | 6 | |
@@ -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\\ClassWithPropertiesBeingRemoved' => [ |
| 45 | 45 | (new ClassReflector(new SingleFileSourceLocator( |
| 46 | - __DIR__ . '/../../../../asset/api/old/ClassWithPropertiesBeingRemoved.php', |
|
| 46 | + __DIR__.'/../../../../asset/api/old/ClassWithPropertiesBeingRemoved.php', |
|
| 47 | 47 | $locator |
| 48 | 48 | )))->reflect('RoaveTestAsset\\ClassWithPropertiesBeingRemoved'), |
| 49 | 49 | (new ClassReflector(new SingleFileSourceLocator( |
| 50 | - __DIR__ . '/../../../../asset/api/new/ClassWithPropertiesBeingRemoved.php', |
|
| 50 | + __DIR__.'/../../../../asset/api/new/ClassWithPropertiesBeingRemoved.php', |
|
| 51 | 51 | $locator |
| 52 | 52 | )))->reflect('RoaveTestAsset\\ClassWithPropertiesBeingRemoved'), |
| 53 | 53 | [ |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace RoaveTest\ApiCompare; |
| 5 | 5 | |
@@ -59,8 +59,8 @@ discard block |
||
| 59 | 59 | Change::removed('Class ClassGone has been deleted', true), |
| 60 | 60 | ]), |
| 61 | 61 | $this->comparator->compare( |
| 62 | - $reflectorFactory->__invoke(__DIR__ . '/../asset/api/old'), |
|
| 63 | - $reflectorFactory->__invoke(__DIR__ . '/../asset/api/new') |
|
| 62 | + $reflectorFactory->__invoke(__DIR__.'/../asset/api/old'), |
|
| 63 | + $reflectorFactory->__invoke(__DIR__.'/../asset/api/new') |
|
| 64 | 64 | ) |
| 65 | 65 | ); |
| 66 | 66 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace RoaveTestAsset; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace RoaveTestAsset; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Command; |
| 5 | 5 | |
@@ -108,14 +108,14 @@ discard block |
||
| 108 | 108 | $toRevision = $this->parseRevision->fromStringForRepository($input->getOption('to'), $sourceRepo); |
| 109 | 109 | $sourcesPath = $input->getArgument('sources-path'); |
| 110 | 110 | |
| 111 | - $output->writeln(sprintf('Comparing from %s to %s...', (string)$fromRevision, (string)$toRevision)); |
|
| 111 | + $output->writeln(sprintf('Comparing from %s to %s...', (string) $fromRevision, (string) $toRevision)); |
|
| 112 | 112 | |
| 113 | 113 | $fromPath = $this->git->checkout($sourceRepo, $fromRevision); |
| 114 | 114 | $toPath = $this->git->checkout($sourceRepo, $toRevision); |
| 115 | 115 | |
| 116 | 116 | try { |
| 117 | - $fromSources = $fromPath . '/' . $sourcesPath; |
|
| 118 | - $toSources = $toPath . '/' . $sourcesPath; |
|
| 117 | + $fromSources = $fromPath.'/'.$sourcesPath; |
|
| 118 | + $toSources = $toPath.'/'.$sourcesPath; |
|
| 119 | 119 | |
| 120 | 120 | Assert::that($fromSources)->directory(); |
| 121 | 121 | Assert::that($toSources)->directory(); |
@@ -124,8 +124,8 @@ discard block |
||
| 124 | 124 | (new Comparator( |
| 125 | 125 | new Comparator\BackwardsCompatibility\ClassBased\PropertyRemoved() |
| 126 | 126 | ))->compare( |
| 127 | - $this->reflectorFactory->__invoke((string)$fromPath . '/' . $sourcesPath), |
|
| 128 | - $this->reflectorFactory->__invoke((string)$toPath . '/' . $sourcesPath) |
|
| 127 | + $this->reflectorFactory->__invoke((string) $fromPath.'/'.$sourcesPath), |
|
| 128 | + $this->reflectorFactory->__invoke((string) $toPath.'/'.$sourcesPath) |
|
| 129 | 129 | ) |
| 130 | 130 | ); |
| 131 | 131 | } finally { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | private function parseRevisionFromInput(InputInterface $input, CheckedOutRepository $repository) : Revision |
| 144 | 144 | { |
| 145 | 145 | return $this->parseRevision->fromStringForRepository( |
| 146 | - (string)$input->getOption('from'), |
|
| 146 | + (string) $input->getOption('from'), |
|
| 147 | 147 | $repository |
| 148 | 148 | ); |
| 149 | 149 | } |