@@ -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 | |
@@ -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 |
@@ -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 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | return array_merge( |
226 | 226 | [[null]], |
227 | 227 | array_merge(...array_map( |
228 | - function (string $type) use ($reflector) : array { |
|
228 | + function(string $type) use ($reflector) : array { |
|
229 | 229 | return [ |
230 | 230 | [ReflectionType::createFromTypeAndReflector($type, false, $reflector)], |
231 | 231 | [ReflectionType::createFromTypeAndReflector($type, true, $reflector)], |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | /** @dataProvider existingNullableTypeStrings */ |
250 | 250 | public function testCovarianceConsidersNullability(string $type) : void |
251 | 251 | { |
252 | - $reflector = new ClassReflector(new StringSourceLocator( |
|
252 | + $reflector = new ClassReflector(new StringSourceLocator( |
|
253 | 253 | <<<'PHP' |
254 | 254 | <?php |
255 | 255 |
@@ -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\Formatter; |
6 | 6 | |
@@ -30,21 +30,21 @@ discard block |
||
30 | 30 | $this->output->writeln( |
31 | 31 | "# Added\n" |
32 | 32 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
33 | - function (Change $change) : bool { |
|
33 | + function(Change $change) : bool { |
|
34 | 34 | return $change->isAdded(); |
35 | 35 | }, |
36 | 36 | ...$arrayOfChanges |
37 | 37 | )) |
38 | 38 | . "\n# Changed\n" |
39 | 39 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
40 | - function (Change $change) : bool { |
|
40 | + function(Change $change) : bool { |
|
41 | 41 | return $change->isChanged(); |
42 | 42 | }, |
43 | 43 | ...$arrayOfChanges |
44 | 44 | )) |
45 | 45 | . "\n# Removed\n" |
46 | 46 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
47 | - function (Change $change) : bool { |
|
47 | + function(Change $change) : bool { |
|
48 | 48 | return $change->isRemoved(); |
49 | 49 | }, |
50 | 50 | ...$arrayOfChanges |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | private function convertFilteredChangesToMarkdownBulletList(callable $filterFunction, Change ...$changes) : array |
57 | 57 | { |
58 | 58 | return array_map( |
59 | - function (Change $change) : string { |
|
60 | - return ' - ' . str_replace(['ADDED: ', 'CHANGED: ', 'REMOVED: '], '', trim((string) $change)) . "\n"; |
|
59 | + function(Change $change) : string { |
|
60 | + return ' - '.str_replace(['ADDED: ', 'CHANGED: ', 'REMOVED: '], '', trim((string) $change))."\n"; |
|
61 | 61 | }, |
62 | 62 | array_filter($changes, $filterFunction) |
63 | 63 | ); |
@@ -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\Command; |
6 | 6 | |
@@ -116,15 +116,15 @@ discard block |
||
116 | 116 | $toPath = $this->git->checkout($sourceRepo, $toRevision); |
117 | 117 | |
118 | 118 | try { |
119 | - $fromSources = $fromPath . '/' . $sourcesPath; |
|
120 | - $toSources = $toPath . '/' . $sourcesPath; |
|
119 | + $fromSources = $fromPath.'/'.$sourcesPath; |
|
120 | + $toSources = $toPath.'/'.$sourcesPath; |
|
121 | 121 | |
122 | 122 | Assert::that($fromSources)->directory(); |
123 | 123 | Assert::that($toSources)->directory(); |
124 | 124 | |
125 | 125 | $changes = $this->comparator->compare( |
126 | - $this->reflectorFactory->__invoke((string) $fromPath . '/' . $sourcesPath), |
|
127 | - $this->reflectorFactory->__invoke((string) $toPath . '/' . $sourcesPath) |
|
126 | + $this->reflectorFactory->__invoke((string) $fromPath.'/'.$sourcesPath), |
|
127 | + $this->reflectorFactory->__invoke((string) $toPath.'/'.$sourcesPath) |
|
128 | 128 | ); |
129 | 129 | |
130 | 130 | (new SymfonyConsoleTextFormatter($stdErr))->write($changes); |
@@ -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 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | return array_reduce( |
35 | 35 | array_keys($commonMethods), |
36 | - function (Changes $accumulator, string $methodName) use ($methodsFrom, $methodsTo) : Changes { |
|
36 | + function(Changes $accumulator, string $methodName) use ($methodsFrom, $methodsTo) : Changes { |
|
37 | 37 | return $accumulator->mergeWith($this->checkMethod->compare( |
38 | 38 | $methodsFrom[$methodName], |
39 | 39 | $methodsTo[$methodName] |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $methods = $class->getMethods(); |
50 | 50 | |
51 | 51 | return array_combine( |
52 | - array_map(function (ReflectionMethod $method) : string { |
|
52 | + array_map(function(ReflectionMethod $method) : string { |
|
53 | 53 | return strtolower($method->getName()); |
54 | 54 | }, $methods), |
55 | 55 | $methods |
@@ -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 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | array_keys($this->accessibleProperties($toClass)) |
38 | 38 | ); |
39 | 39 | |
40 | - return Changes::fromArray(array_values(array_map(function (string $property) use ($fromProperties) : Change { |
|
40 | + return Changes::fromArray(array_values(array_map(function(string $property) use ($fromProperties) : Change { |
|
41 | 41 | return Change::removed( |
42 | 42 | sprintf('Property %s was removed', $this->formatProperty->__invoke($fromProperties[$property])), |
43 | 43 | true |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | /** @return ReflectionProperty[] */ |
49 | 49 | private function accessibleProperties(ReflectionClass $class) : array |
50 | 50 | { |
51 | - return array_filter($class->getProperties(), function (ReflectionProperty $property) : bool { |
|
51 | + return array_filter($class->getProperties(), function(ReflectionProperty $property) : bool { |
|
52 | 52 | return $property->isPublic() || $property->isProtected(); |
53 | 53 | }); |
54 | 54 | } |
@@ -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 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | return array_reduce( |
31 | 31 | array_keys($commonProperties), |
32 | - function (Changes $accumulator, string $propertyName) use ($propertiesFrom, $propertiesTo) : Changes { |
|
32 | + function(Changes $accumulator, string $propertyName) use ($propertiesFrom, $propertiesTo) : Changes { |
|
33 | 33 | return $accumulator->mergeWith($this->checkProperty->compare( |
34 | 34 | $propertiesFrom[$propertyName], |
35 | 35 | $propertiesTo[$propertyName] |
@@ -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 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | return array_reduce( |
31 | 31 | array_keys($commonConstants), |
32 | - function (Changes $accumulator, string $constantName) use ($constantsFrom, $constantsTo) : Changes { |
|
32 | + function(Changes $accumulator, string $constantName) use ($constantsFrom, $constantsTo) : Changes { |
|
33 | 33 | return $accumulator->mergeWith($this->checkConstant->compare( |
34 | 34 | $constantsFrom[$constantName], |
35 | 35 | $constantsTo[$constantName] |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\MethodBased; |
6 | 6 |