@@ -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\\ClassWithMethodsBeingRemoved' => [ |
45 | 45 | (new ClassReflector(new SingleFileSourceLocator( |
46 | - __DIR__ . '/../../../../asset/api/old/ClassWithMethodsBeingRemoved.php', |
|
46 | + __DIR__.'/../../../../asset/api/old/ClassWithMethodsBeingRemoved.php', |
|
47 | 47 | $locator |
48 | 48 | )))->reflect('RoaveTestAsset\\ClassWithMethodsBeingRemoved'), |
49 | 49 | (new ClassReflector(new SingleFileSourceLocator( |
50 | - __DIR__ . '/../../../../asset/api/new/ClassWithMethodsBeingRemoved.php', |
|
50 | + __DIR__.'/../../../../asset/api/new/ClassWithMethodsBeingRemoved.php', |
|
51 | 51 | $locator |
52 | 52 | )))->reflect('RoaveTestAsset\\ClassWithMethodsBeingRemoved'), |
53 | 53 | [ |
@@ -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\\ClassWithPropertyVisibilitiesBeingChanged' => [ |
45 | 45 | (new ClassReflector(new SingleFileSourceLocator( |
46 | - __DIR__ . '/../../../../asset/api/old/ClassWithPropertyVisibilitiesBeingChanged.php', |
|
46 | + __DIR__.'/../../../../asset/api/old/ClassWithPropertyVisibilitiesBeingChanged.php', |
|
47 | 47 | $locator |
48 | 48 | )))->reflect('RoaveTestAsset\\ClassWithPropertyVisibilitiesBeingChanged'), |
49 | 49 | (new ClassReflector(new SingleFileSourceLocator( |
50 | - __DIR__ . '/../../../../asset/api/new/ClassWithPropertyVisibilitiesBeingChanged.php', |
|
50 | + __DIR__.'/../../../../asset/api/new/ClassWithPropertyVisibilitiesBeingChanged.php', |
|
51 | 51 | $locator |
52 | 52 | )))->reflect('RoaveTestAsset\\ClassWithPropertyVisibilitiesBeingChanged'), |
53 | 53 | [ |
@@ -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\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 RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassBased; |
6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | self::assertSame( |
32 | 32 | $expectedMessages, |
33 | - array_map(function (Change $change) : string { |
|
33 | + array_map(function(Change $change) : string { |
|
34 | 34 | return $change->__toString(); |
35 | 35 | }, iterator_to_array($changes)) |
36 | 36 | ); |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | return [ |
45 | 45 | 'RoaveTestAsset\\ClassWithPropertyVisibilitiesBeingChanged' => [ |
46 | 46 | (new ClassReflector(new SingleFileSourceLocator( |
47 | - __DIR__ . '/../../../../asset/api/old/ClassWithMethodVisibilitiesBeingChanged.php', |
|
47 | + __DIR__.'/../../../../asset/api/old/ClassWithMethodVisibilitiesBeingChanged.php', |
|
48 | 48 | $locator |
49 | 49 | )))->reflect('RoaveTestAsset\\ClassWithMethodVisibilitiesBeingChanged'), |
50 | 50 | (new ClassReflector(new SingleFileSourceLocator( |
51 | - __DIR__ . '/../../../../asset/api/new/ClassWithMethodVisibilitiesBeingChanged.php', |
|
51 | + __DIR__.'/../../../../asset/api/new/ClassWithMethodVisibilitiesBeingChanged.php', |
|
52 | 52 | $locator |
53 | 53 | )))->reflect('RoaveTestAsset\\ClassWithMethodVisibilitiesBeingChanged'), |
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 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | { |
22 | 22 | return array_reduce( |
23 | 23 | $this->checks, |
24 | - function (Changes $changes, ClassBased $check) use ($fromClass, $toClass) : Changes { |
|
24 | + function(Changes $changes, ClassBased $check) use ($fromClass, $toClass) : Changes { |
|
25 | 25 | return $changes->mergeWith($check->compare($fromClass, $toClass)); |
26 | 26 | }, |
27 | 27 | Changes::new() |
@@ -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_change_key_case($this->accessibleMethods($toClass), \CASE_UPPER) |
22 | 22 | ); |
23 | 23 | |
24 | - return Changes::fromArray(array_values(array_map(function (ReflectionMethod $method) use ($fromClass) : Change { |
|
24 | + return Changes::fromArray(array_values(array_map(function(ReflectionMethod $method) use ($fromClass) : Change { |
|
25 | 25 | return Change::removed( |
26 | 26 | sprintf('Method %s#%s() was removed', $fromClass->getName(), $method->getName()), |
27 | 27 | true |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | /** @return ReflectionMethod[] */ |
33 | 33 | private function accessibleMethods(ReflectionClass $class) : array |
34 | 34 | { |
35 | - $methods = array_filter($class->getMethods(), function (ReflectionMethod $method) : bool { |
|
35 | + $methods = array_filter($class->getMethods(), function(ReflectionMethod $method) : bool { |
|
36 | 36 | return $method->isPublic() || $method->isProtected(); |
37 | 37 | }); |
38 | 38 | |
39 | 39 | return array_combine( |
40 | - array_map(function (ReflectionMethod $method) : string { |
|
40 | + array_map(function(ReflectionMethod $method) : string { |
|
41 | 41 | return $method->getName(); |
42 | 42 | }, $methods), |
43 | 43 | $methods |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace RoaveTest\ApiCompare; |
5 | 5 |
@@ -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\\ClassWithConstantVisibilitiesBeingChanged' => [ |
45 | 45 | (new ClassReflector(new SingleFileSourceLocator( |
46 | - __DIR__ . '/../../../../asset/api/old/ClassWithConstantVisibilitiesBeingChanged.php', |
|
46 | + __DIR__.'/../../../../asset/api/old/ClassWithConstantVisibilitiesBeingChanged.php', |
|
47 | 47 | $locator |
48 | 48 | )))->reflect('RoaveTestAsset\\ClassWithConstantVisibilitiesBeingChanged'), |
49 | 49 | (new ClassReflector(new SingleFileSourceLocator( |
50 | - __DIR__ . '/../../../../asset/api/new/ClassWithConstantVisibilitiesBeingChanged.php', |
|
50 | + __DIR__.'/../../../../asset/api/new/ClassWithConstantVisibilitiesBeingChanged.php', |
|
51 | 51 | $locator |
52 | 52 | )))->reflect('RoaveTestAsset\\ClassWithConstantVisibilitiesBeingChanged'), |
53 | 53 | [ |
@@ -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\\ClassWithConstantValuesBeingChanged' => [ |
45 | 45 | (new ClassReflector(new SingleFileSourceLocator( |
46 | - __DIR__ . '/../../../../asset/api/old/ClassWithConstantValuesBeingChanged.php', |
|
46 | + __DIR__.'/../../../../asset/api/old/ClassWithConstantValuesBeingChanged.php', |
|
47 | 47 | $locator |
48 | 48 | )))->reflect('RoaveTestAsset\\ClassWithConstantValuesBeingChanged'), |
49 | 49 | (new ClassReflector(new SingleFileSourceLocator( |
50 | - __DIR__ . '/../../../../asset/api/new/ClassWithConstantValuesBeingChanged.php', |
|
50 | + __DIR__.'/../../../../asset/api/new/ClassWithConstantValuesBeingChanged.php', |
|
51 | 51 | $locator |
52 | 52 | )))->reflect('RoaveTestAsset\\ClassWithConstantValuesBeingChanged'), |
53 | 53 | [ |