@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Git; |
| 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 Roave\ApiCompare\Git; |
| 6 | 6 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public function checkout(CheckedOutRepository $sourceRepository, Revision $revision) : CheckedOutRepository |
| 18 | 18 | { |
| 19 | - $checkoutDirectory = sys_get_temp_dir() . '/api-compare-' . (string) $revision; |
|
| 19 | + $checkoutDirectory = sys_get_temp_dir().'/api-compare-'.(string) $revision; |
|
| 20 | 20 | |
| 21 | 21 | (new Process(['git', 'clone', (string) $sourceRepository, $checkoutDirectory]))->mustRun(); |
| 22 | 22 | (new Process(['git', 'checkout', (string) $revision]))->setWorkingDirectory($checkoutDirectory)->mustRun(); |
@@ -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,19 +37,19 @@ discard block |
||
| 37 | 37 | array_combine( |
| 38 | 38 | $sharedKeys, |
| 39 | 39 | array_map( |
| 40 | - function (string $propertyName) use ($visibilitiesFrom, $visibilitiesTo) : array { |
|
| 40 | + function(string $propertyName) use ($visibilitiesFrom, $visibilitiesTo) : array { |
|
| 41 | 41 | return [$visibilitiesFrom[$propertyName], $visibilitiesTo[$propertyName]]; |
| 42 | 42 | }, |
| 43 | 43 | $sharedKeys |
| 44 | 44 | ) |
| 45 | 45 | ), |
| 46 | - function (array $visibilities) : bool { |
|
| 46 | + function(array $visibilities) : bool { |
|
| 47 | 47 | // Note: works because public, protected and private are (luckily) sortable |
| 48 | 48 | return $visibilities[0] > $visibilities[1]; |
| 49 | 49 | } |
| 50 | 50 | ); |
| 51 | 51 | |
| 52 | - return Changes::fromArray(array_values(array_map(function ( |
|
| 52 | + return Changes::fromArray(array_values(array_map(function( |
|
| 53 | 53 | string $methodName, |
| 54 | 54 | array $visibilities |
| 55 | 55 | ) use ( |
@@ -74,10 +74,10 @@ discard block |
||
| 74 | 74 | $methods = $class->getMethods(); |
| 75 | 75 | |
| 76 | 76 | return array_combine( |
| 77 | - array_map(function (ReflectionMethod $method) : string { |
|
| 77 | + array_map(function(ReflectionMethod $method) : string { |
|
| 78 | 78 | return $method->getName(); |
| 79 | 79 | }, $methods), |
| 80 | - array_map(function (ReflectionMethod $method) : string { |
|
| 80 | + array_map(function(ReflectionMethod $method) : string { |
|
| 81 | 81 | if ($method->isPublic()) { |
| 82 | 82 | return self::VISIBILITY_PUBLIC; |
| 83 | 83 | } |
@@ -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 | array_change_key_case($this->accessibleMethods($toClass), CASE_UPPER) |
| 30 | 30 | ); |
| 31 | 31 | |
| 32 | - return Changes::fromArray(array_values(array_map(function (ReflectionMethod $method) use ($fromClass) : Change { |
|
| 32 | + return Changes::fromArray(array_values(array_map(function(ReflectionMethod $method) use ($fromClass) : Change { |
|
| 33 | 33 | return Change::removed( |
| 34 | 34 | sprintf('Method %s#%s() was removed', $fromClass->getName(), $method->getName()), |
| 35 | 35 | true |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | /** @return ReflectionMethod[] */ |
| 41 | 41 | private function accessibleMethods(ReflectionClass $class) : array |
| 42 | 42 | { |
| 43 | - $methods = array_filter($class->getMethods(), function (ReflectionMethod $method) : bool { |
|
| 43 | + $methods = array_filter($class->getMethods(), function(ReflectionMethod $method) : bool { |
|
| 44 | 44 | return $method->isPublic() || $method->isProtected(); |
| 45 | 45 | }); |
| 46 | 46 | |
| 47 | 47 | return array_combine( |
| 48 | - array_map(function (ReflectionMethod $method) : string { |
|
| 48 | + array_map(function(ReflectionMethod $method) : string { |
|
| 49 | 49 | return $method->getName(); |
| 50 | 50 | }, $methods), |
| 51 | 51 | $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,19 +37,19 @@ discard block |
||
| 37 | 37 | array_combine( |
| 38 | 38 | $sharedKeys, |
| 39 | 39 | array_map( |
| 40 | - function (string $propertyName) use ($visibilitiesFrom, $visibilitiesTo) : array { |
|
| 40 | + function(string $propertyName) use ($visibilitiesFrom, $visibilitiesTo) : array { |
|
| 41 | 41 | return [$visibilitiesFrom[$propertyName], $visibilitiesTo[$propertyName]]; |
| 42 | 42 | }, |
| 43 | 43 | $sharedKeys |
| 44 | 44 | ) |
| 45 | 45 | ), |
| 46 | - function (array $visibilities) : bool { |
|
| 46 | + function(array $visibilities) : bool { |
|
| 47 | 47 | // Note: works because public, protected and private are (luckily) sortable |
| 48 | 48 | return $visibilities[0] > $visibilities[1]; |
| 49 | 49 | } |
| 50 | 50 | ); |
| 51 | 51 | |
| 52 | - return Changes::fromArray(array_values(array_map(function ( |
|
| 52 | + return Changes::fromArray(array_values(array_map(function( |
|
| 53 | 53 | string $propertyName, |
| 54 | 54 | array $visibilities |
| 55 | 55 | ) use ( |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | /** @return string[] */ |
| 72 | 72 | private function propertyVisibilities(ReflectionClass $class) : array |
| 73 | 73 | { |
| 74 | - return array_map(function (ReflectionProperty $property) : string { |
|
| 74 | + return array_map(function(ReflectionProperty $property) : string { |
|
| 75 | 75 | if ($property->isPublic()) { |
| 76 | 76 | return self::VISIBILITY_PUBLIC; |
| 77 | 77 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Formatter; |
| 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 Roave\ApiCompareCli; |
| 6 | 6 | |
@@ -15,9 +15,9 @@ discard block |
||
| 15 | 15 | use Symfony\Component\Console\Application; |
| 16 | 16 | use function file_exists; |
| 17 | 17 | |
| 18 | -(function () : void { |
|
| 19 | - foreach ([__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../autoload.php'] as $autoload) { |
|
| 20 | - if (! file_exists($autoload)) { |
|
| 18 | +(function() : void { |
|
| 19 | + foreach ([__DIR__.'/../vendor/autoload.php', __DIR__.'/../autoload.php'] as $autoload) { |
|
| 20 | + if (!file_exists($autoload)) { |
|
| 21 | 21 | continue; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -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\Git; |
| 6 | 6 | |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | public function testFromPath() : void |
| 20 | 20 | { |
| 21 | - $path = sys_get_temp_dir() . '/' . uniqid('testPath', true); |
|
| 21 | + $path = sys_get_temp_dir().'/'.uniqid('testPath', true); |
|
| 22 | 22 | mkdir($path, 0777, true); |
| 23 | - mkdir($path . '/.git'); |
|
| 23 | + mkdir($path.'/.git'); |
|
| 24 | 24 | |
| 25 | 25 | $checkedOutRepository = CheckedOutRepository::fromPath($path); |
| 26 | 26 | self::assertSame($path, (string) $checkedOutRepository); |
| 27 | 27 | |
| 28 | - rmdir($path . '/.git'); |
|
| 28 | + rmdir($path.'/.git'); |
|
| 29 | 29 | rmdir($path); |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace RoaveTest\ApiCompare\Git; |
| 5 | 5 | |