@@ -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 | ); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | , |
69 | 69 | $locator |
70 | 70 | )); |
71 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
71 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
72 | 72 | <<<'PHP' |
73 | 73 | <?php |
74 | 74 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | array_keys($classes), |
103 | 103 | array_map( |
104 | 104 | /** @psalm-param list<string> $errors https://github.com/vimeo/psalm/issues/2772 */ |
105 | - static function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
105 | + static function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
106 | 106 | return [ |
107 | 107 | $fromReflector->reflect($className), |
108 | 108 | $toReflector->reflect($className), |
@@ -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 | ); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | , |
69 | 69 | $locator |
70 | 70 | )); |
71 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
71 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
72 | 72 | <<<'PHP' |
73 | 73 | <?php |
74 | 74 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | array_keys($classes), |
103 | 103 | array_map( |
104 | 104 | /** @psalm-param list<string> $errors https://github.com/vimeo/psalm/issues/2772 */ |
105 | - static function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
105 | + static function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
106 | 106 | return [ |
107 | 107 | $fromReflector->reflect($className), |
108 | 108 | $toReflector->reflect($className), |
@@ -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 | ); |
@@ -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), |
@@ -33,9 +33,9 @@ |
||
33 | 33 | |
34 | 34 | $check = $this->createMock(ClassBased::class); |
35 | 35 | $check->expects(self::once()) |
36 | - ->method('__invoke') |
|
37 | - ->with($fromReflection, $toReflection) |
|
38 | - ->willReturn(Changes::fromList(Change::removed('foo', true))); |
|
36 | + ->method('__invoke') |
|
37 | + ->with($fromReflection, $toReflection) |
|
38 | + ->willReturn(Changes::fromList(Change::removed('foo', true))); |
|
39 | 39 | |
40 | 40 | self::assertEquals( |
41 | 41 | Changes::fromList(Change::removed('foo', true)), |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | ->getOutput() |
83 | 83 | ); |
84 | 84 | |
85 | - file_put_contents($repoPath . '/a-file.txt', 'file contents'); |
|
85 | + file_put_contents($repoPath.'/a-file.txt', 'file contents'); |
|
86 | 86 | |
87 | 87 | (new Process(['git', 'add', 'a-file.txt'], $repoPath)) |
88 | 88 | ->mustRun(); |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | $first = $git->checkout($sourceRepository, $firstCommit); |
103 | 103 | $second = $git->checkout($sourceRepository, $secondCommit); |
104 | 104 | |
105 | - self::assertFileDoesNotExist($first->__toString() . '/a-file.txt'); |
|
106 | - self::assertFileExists($second->__toString() . '/a-file.txt'); |
|
105 | + self::assertFileDoesNotExist($first->__toString().'/a-file.txt'); |
|
106 | + self::assertFileExists($second->__toString().'/a-file.txt'); |
|
107 | 107 | |
108 | 108 | $git->remove($first); |
109 | 109 | $git->remove($second); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | public function testExceptionIsThrownWhenTwoPathsCollide() : void |
115 | 115 | { |
116 | - $git = new GitCheckoutRevisionToTemporaryPath(static function () : string { |
|
116 | + $git = new GitCheckoutRevisionToTemporaryPath(static function() : string { |
|
117 | 117 | return 'foo'; |
118 | 118 | }); |
119 | 119 | $sourceRepository = $this->sourceRepository(); |
@@ -141,6 +141,6 @@ discard block |
||
141 | 141 | |
142 | 142 | private function sourceRepository() : CheckedOutRepository |
143 | 143 | { |
144 | - return CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../..')); |
|
144 | + return CheckedOutRepository::fromPath(realpath(__DIR__.'/../../..')); |
|
145 | 145 | } |
146 | 146 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | array_keys($this->accessibleProperties($toClass)) |
35 | 35 | ); |
36 | 36 | |
37 | - return Changes::fromList(...array_map(function (string $property) use ($fromProperties) : Change { |
|
37 | + return Changes::fromList(...array_map(function(string $property) use ($fromProperties) : Change { |
|
38 | 38 | return Change::removed( |
39 | 39 | sprintf('Property %s was removed', $this->formatProperty->__invoke($fromProperties[$property])), |
40 | 40 | true |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | /** @return ReflectionProperty[] */ |
46 | 46 | private function accessibleProperties(ReflectionClass $class) : array |
47 | 47 | { |
48 | - $classIsOpen = ! $class->isFinal(); |
|
48 | + $classIsOpen = !$class->isFinal(); |
|
49 | 49 | |
50 | - return array_filter($class->getProperties(), function (ReflectionProperty $property) use ($classIsOpen) : bool { |
|
50 | + return array_filter($class->getProperties(), function(ReflectionProperty $property) use ($classIsOpen) : bool { |
|
51 | 51 | return ($property->isPublic() |
52 | 52 | || ($classIsOpen && $property->isProtected())) |
53 | - && ! $this->isInternalDocComment($property->getDocComment()); |
|
53 | + && !$this->isInternalDocComment($property->getDocComment()); |
|
54 | 54 | }); |
55 | 55 | } |
56 | 56 |