@@ -27,7 +27,7 @@ |
||
27 | 27 | public function __invoke(ReflectionProperty $fromProperty, ReflectionProperty $toProperty) : Changes |
28 | 28 | { |
29 | 29 | if ($this->isInternalDocComment($toProperty->getDocComment()) |
30 | - && ! $this->isInternalDocComment($fromProperty->getDocComment()) |
|
30 | + && !$this->isInternalDocComment($fromProperty->getDocComment()) |
|
31 | 31 | ) { |
32 | 32 | return Changes::fromList(Change::changed( |
33 | 33 | sprintf( |
@@ -32,7 +32,7 @@ |
||
32 | 32 | ->getOutput(); |
33 | 33 | |
34 | 34 | return new VersionCollection(...array_filter( |
35 | - array_map(static function (string $maybeVersion) : ?Version { |
|
35 | + array_map(static function(string $maybeVersion) : ?Version { |
|
36 | 36 | try { |
37 | 37 | return Version::fromString($maybeVersion); |
38 | 38 | } catch (InvalidVersionString $e) { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $stableVersions = $versions->matching(new class implements Constraint { |
30 | 30 | public function assert(Version $version) : bool |
31 | 31 | { |
32 | - return ! $version->isPreRelease(); |
|
32 | + return !$version->isPreRelease(); |
|
33 | 33 | } |
34 | 34 | }); |
35 | 35 | |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | $lastVersion = $versionsSortedDescending->first(); |
39 | 39 | |
40 | 40 | $matchingMinorVersions = $stableVersions |
41 | - ->matching(CompositeConstraint::and( |
|
41 | + ->matching(CompositeConstraint:: and ( |
|
42 | 42 | OperationConstraint::lessOrEqualTo($lastVersion), |
43 | - OperationConstraint::greaterOrEqualTo(Version::fromString($lastVersion->getMajor() . '.' . $lastVersion->getMinor() . '.0')) |
|
43 | + OperationConstraint::greaterOrEqualTo(Version::fromString($lastVersion->getMajor().'.'.$lastVersion->getMinor().'.0')) |
|
44 | 44 | )) |
45 | 45 | ->sortedAscending(); |
46 | 46 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | self::assertSame( |
49 | 49 | $expectedVersion, |
50 | 50 | (new PickLastMinorVersionFromCollection())->forVersions( |
51 | - new VersionCollection(...array_map(static function (string $version) : Version { |
|
51 | + new VersionCollection(...array_map(static function(string $version) : Version { |
|
52 | 52 | return Version::fromString($version); |
53 | 53 | }, $collectionOfVersions)) |
54 | 54 | )->toString() |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | |
27 | 27 | public function setUp() : void |
28 | 28 | { |
29 | - $tmpGitRepo = sys_get_temp_dir() . '/api-compare-' . uniqid('tmpGitRepo', true); |
|
29 | + $tmpGitRepo = sys_get_temp_dir().'/api-compare-'.uniqid('tmpGitRepo', true); |
|
30 | 30 | mkdir($tmpGitRepo, 0777, true); |
31 | 31 | (new Process(['git', 'init']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
32 | - file_put_contents($tmpGitRepo . '/test', uniqid('testContent', true)); |
|
32 | + file_put_contents($tmpGitRepo.'/test', uniqid('testContent', true)); |
|
33 | 33 | (new Process(['git', 'add', '.']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
34 | 34 | (new Process(['git', 'commit', '-m', '"whatever"']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
35 | 35 | $this->repoPath = CheckedOutRepository::fromPath($tmpGitRepo); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | private function getTags() : array |
50 | 50 | { |
51 | 51 | return array_map( |
52 | - static function (Version $version) : string { |
|
52 | + static function(Version $version) : string { |
|
53 | 53 | return $version->toString(); |
54 | 54 | }, |
55 | 55 | iterator_to_array((new GetVersionCollectionFromGitRepository())->fromRepository($this->repoPath)) |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | |
49 | 49 | public function testFromIteratorBuffersAllChangesWithoutLoadingThemEagerly() : void |
50 | 50 | { |
51 | - $stopProducingValues = static function () : void { |
|
51 | + $stopProducingValues = static function() : void { |
|
52 | 52 | self::fail('No values should have been produced'); |
53 | 53 | }; |
54 | 54 | |
55 | - $changesProvider = static function () use (&$stopProducingValues) : Generator { |
|
55 | + $changesProvider = static function() use (&$stopProducingValues) : Generator { |
|
56 | 56 | $stopProducingValues(); |
57 | 57 | |
58 | 58 | yield Change::changed('a', true); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | Change::changed('b', false), |
72 | 72 | ]; |
73 | 73 | |
74 | - $stopProducingValues = static function () : void { |
|
74 | + $stopProducingValues = static function() : void { |
|
75 | 75 | }; |
76 | 76 | |
77 | 77 | self::assertEquals($expectedChanges, iterator_to_array($changes)); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | return TypeRestriction::array(array_combine( |
70 | 70 | array_keys($properties), |
71 | 71 | array_map( |
72 | - static function (string $expectedMessage, ReflectionProperty $property) : array { |
|
72 | + static function(string $expectedMessage, ReflectionProperty $property) : array { |
|
73 | 73 | return [$property, $expectedMessage]; |
74 | 74 | }, |
75 | 75 | array_keys($properties), |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | self::assertSame( |
39 | 39 | $expectedMessages, |
40 | - array_map(static function (Change $change) : string { |
|
40 | + array_map(static function(Change $change) : string { |
|
41 | 41 | return $change->__toString(); |
42 | 42 | }, iterator_to_array($changes)) |
43 | 43 | ); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | array_keys($properties), |
129 | 129 | array_map( |
130 | 130 | /** @psalm-param list<string> $errorMessages https://github.com/vimeo/psalm/issues/2772 */ |
131 | - static function (string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
131 | + static function(string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
132 | 132 | return [ |
133 | 133 | $fromClass->getMethod($methodName), |
134 | 134 | $toClass->getMethod($methodName), |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | self::assertSame( |
39 | 39 | $expectedMessages, |
40 | - array_map(static function (Change $change) : string { |
|
40 | + array_map(static function(Change $change) : string { |
|
41 | 41 | return $change->__toString(); |
42 | 42 | }, iterator_to_array($changes)) |
43 | 43 | ); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | array_keys($properties), |
115 | 115 | array_map( |
116 | 116 | /** @psalm-param list<string> $errorMessages https://github.com/vimeo/psalm/issues/2772 */ |
117 | - static function (string $method, array $errorMessages) use ($fromClass, $toClass) : array { |
|
117 | + static function(string $method, array $errorMessages) use ($fromClass, $toClass) : array { |
|
118 | 118 | return [ |
119 | 119 | $fromClass->getMethod($method), |
120 | 120 | $toClass->getMethod($method), |