@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | return false; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - if ($comparedType->allowsNull() && ! $type->allowsNull()) { |
|
| 34 | + if ($comparedType->allowsNull() && !$type->allowsNull()) { |
|
| 35 | 35 | return false; |
| 36 | 36 | } |
| 37 | 37 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | return false; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - if ($typeAsString === 'object' && ! $comparedType->isBuiltin()) { |
|
| 50 | + if ($typeAsString === 'object' && !$comparedType->isBuiltin()) { |
|
| 51 | 51 | // `object` is not covariant to a defined class type |
| 52 | 52 | return true; |
| 53 | 53 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | return true; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - if ($typeAsString === 'iterable' && ! $comparedType->isBuiltin()) { |
|
| 60 | + if ($typeAsString === 'iterable' && !$comparedType->isBuiltin()) { |
|
| 61 | 61 | if ($comparedType->targetReflectionClass()->implementsInterface(Traversable::class)) { |
| 62 | 62 | // `iterable` can be restricted via any `Iterator` implementation |
| 63 | 63 | return true; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | return false; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - if ($type->allowsNull() && ! $comparedType->allowsNull()) { |
|
| 32 | + if ($type->allowsNull() && !$comparedType->allowsNull()) { |
|
| 33 | 33 | return false; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | return true; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - if ($comparedTypeAsString === 'object' && ! $type->isBuiltin()) { |
|
| 48 | + if ($comparedTypeAsString === 'object' && !$type->isBuiltin()) { |
|
| 49 | 49 | // `object` is always contravariant to any object type |
| 50 | 50 | return true; |
| 51 | 51 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | { |
| 67 | 67 | return array_filter( |
| 68 | 68 | $function->getParameters(), |
| 69 | - static function (ReflectionParameter $parameter) : bool { |
|
| 69 | + static function(ReflectionParameter $parameter) : bool { |
|
| 70 | 70 | return $parameter->isDefaultValueAvailable(); |
| 71 | 71 | } |
| 72 | 72 | ); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $sha1 = sha1(uniqid('sha1', true)); |
| 29 | 29 | |
| 30 | - self::assertSame($sha1, (string) Revision::fromSha1($sha1 . "\n")); |
|
| 30 | + self::assertSame($sha1, (string) Revision::fromSha1($sha1."\n")); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -40,8 +40,8 @@ discard block |
||
| 40 | 40 | ['a'], |
| 41 | 41 | [str_repeat('a', 39)], |
| 42 | 42 | [str_repeat('a', 41)], |
| 43 | - [' ' . str_repeat('a', 42)], |
|
| 44 | - [str_repeat('a', 42) . ' '], |
|
| 43 | + [' '.str_repeat('a', 42)], |
|
| 44 | + [str_repeat('a', 42).' '], |
|
| 45 | 45 | ]; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | ->astLocator |
| 78 | 78 | ->expects(self::once()) |
| 79 | 79 | ->method('findReflection') |
| 80 | - ->with($this->reflector, self::callback(static function (LocatedSource $source) : bool { |
|
| 80 | + ->with($this->reflector, self::callback(static function(LocatedSource $source) : bool { |
|
| 81 | 81 | self::assertSame(file_get_contents(__FILE__), $source->getSource()); |
| 82 | 82 | self::assertSame(__FILE__, $source->getFileName()); |
| 83 | 83 | self::assertNull($source->getExtensionName()); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | return [ |
| 99 | 99 | [__FILE__], |
| 100 | - [__DIR__ . '/../SourceLocator/StaticClassMapSourceLocatorTest.php'], |
|
| 100 | + [__DIR__.'/../SourceLocator/StaticClassMapSourceLocatorTest.php'], |
|
| 101 | 101 | ]; |
| 102 | 102 | } |
| 103 | 103 | |
@@ -32,9 +32,9 @@ |
||
| 32 | 32 | |
| 33 | 33 | $check = $this->createMock(TraitBased::class); |
| 34 | 34 | $check->expects(self::once()) |
| 35 | - ->method('__invoke') |
|
| 36 | - ->with($reflection, $reflection) |
|
| 37 | - ->willReturn(Changes::fromList(Change::removed('foo', true))); |
|
| 35 | + ->method('__invoke') |
|
| 36 | + ->with($reflection, $reflection) |
|
| 37 | + ->willReturn(Changes::fromList(Change::removed('foo', true))); |
|
| 38 | 38 | |
| 39 | 39 | self::assertEquals( |
| 40 | 40 | Changes::fromList(Change::removed('foo', true)), |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | self::assertSame( |
| 33 | 33 | $expectedMessages, |
| 34 | - array_map(static function (Change $change) : string { |
|
| 34 | + array_map(static function(Change $change) : string { |
|
| 35 | 35 | return $change->__toString(); |
| 36 | 36 | }, iterator_to_array($changes)) |
| 37 | 37 | ); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | , |
| 54 | 54 | $locator |
| 55 | 55 | )); |
| 56 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 56 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
| 57 | 57 | <<<'PHP' |
| 58 | 58 | <?php |
| 59 | 59 | |
@@ -32,9 +32,9 @@ |
||
| 32 | 32 | |
| 33 | 33 | $check = $this->createMock(InterfaceBased::class); |
| 34 | 34 | $check->expects(self::once()) |
| 35 | - ->method('__invoke') |
|
| 36 | - ->with($reflection, $reflection) |
|
| 37 | - ->willReturn(Changes::fromList(Change::removed('foo', true))); |
|
| 35 | + ->method('__invoke') |
|
| 36 | + ->with($reflection, $reflection) |
|
| 37 | + ->willReturn(Changes::fromList(Change::removed('foo', true))); |
|
| 38 | 38 | |
| 39 | 39 | self::assertEquals( |
| 40 | 40 | Changes::fromList(Change::removed('foo', true)), |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $check = $this->createMock(FunctionBased::class); |
| 35 | 35 | $check->expects(self::once()) |
| 36 | - ->method('__invoke') |
|
| 37 | - ->with($function, $function) |
|
| 38 | - ->willReturn(Changes::fromList(Change::removed('foo', true))); |
|
| 36 | + ->method('__invoke') |
|
| 37 | + ->with($function, $function) |
|
| 38 | + ->willReturn(Changes::fromList(Change::removed('foo', true))); |
|
| 39 | 39 | |
| 40 | 40 | self::assertEquals( |
| 41 | 41 | Changes::fromList(Change::removed('foo', true)), |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $check = $this->createMock(FunctionBased::class); |
| 63 | 63 | $check->expects(self::never()) |
| 64 | - ->method('__invoke'); |
|
| 64 | + ->method('__invoke'); |
|
| 65 | 65 | |
| 66 | 66 | self::assertEquals( |
| 67 | 67 | Changes::empty(), |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | public function testNormalFunctionsAreNotExcluded() : void |
| 21 | 21 | { |
| 22 | - $source = new StringSourceLocator( |
|
| 22 | + $source = new StringSourceLocator( |
|
| 23 | 23 | <<<'PHP' |
| 24 | 24 | <?php |
| 25 | 25 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | public function testInternalFunctionsAreExcluded() : void |
| 48 | 48 | { |
| 49 | - $source = new StringSourceLocator( |
|
| 49 | + $source = new StringSourceLocator( |
|
| 50 | 50 | <<<'PHP' |
| 51 | 51 | <?php |
| 52 | 52 | |