@@ -92,8 +92,7 @@ |
||
| 92 | 92 | $this->context = $context; |
| 93 | 93 | |
| 94 | 94 | $this->annotationReader = PHP_MAJOR_VERSION >= 8 ? |
| 95 | - new BuiltinAnnotationReader() : |
|
| 96 | - new NullAnnotationReader(); |
|
| 95 | + new BuiltinAnnotationReader() : new NullAnnotationReader(); |
|
| 97 | 96 | |
| 98 | 97 | $this->addTypeConverter(...self::defaultTypeConverters()); |
| 99 | 98 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | // @codeCoverageIgnoreStart |
| 59 | 59 | if (!class_exists(AnnotationReader::class)) { |
| 60 | 60 | throw new LogicException(sprintf( |
| 61 | - 'The annotation reader {%s} requires the doctrine/annotations package, ' . |
|
| 61 | + 'The annotation reader {%s} requires the doctrine/annotations package, '. |
|
| 62 | 62 | 'run the command `composer require doctrine/annotations` to resolve it.', |
| 63 | 63 | __CLASS__, |
| 64 | 64 | )); |
@@ -91,8 +91,7 @@ |
||
| 91 | 91 | $holder = $parameter->getDeclaringFunction(); |
| 92 | 92 | |
| 93 | 93 | return $holder instanceof ReflectionMethod ? |
| 94 | - self::unsupportedMethodParameterType($type, $parameter, $holder) : |
|
| 95 | - self::unsupportedFunctionParameterType($type, $parameter, $holder); |
|
| 94 | + self::unsupportedMethodParameterType($type, $parameter, $holder) : self::unsupportedFunctionParameterType($type, $parameter, $holder); |
|
| 96 | 95 | } |
| 97 | 96 | |
| 98 | 97 | /** |
@@ -58,8 +58,8 @@ |
||
| 58 | 58 | return; |
| 59 | 59 | } // @codeCoverageIgnoreEnd |
| 60 | 60 | |
| 61 | - if (! $holder instanceof ReflectionProperty && |
|
| 62 | - ! $holder instanceof ReflectionParameter) { |
|
| 61 | + if (!$holder instanceof ReflectionProperty && |
|
| 62 | + !$holder instanceof ReflectionParameter) { |
|
| 63 | 63 | return; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | |
| 605 | 605 | $this->assertInvalidValueExceptionCount(1); |
| 606 | 606 | // phpcs:ignore Generic.Files.LineLength |
| 607 | - $this->assertInvalidValueExceptionMessage(0, 'This value is not a valid choice; expected values: ' . join(', ', Fixture\IntegerEnum::values()) . '.'); |
|
| 607 | + $this->assertInvalidValueExceptionMessage(0, 'This value is not a valid choice; expected values: '.join(', ', Fixture\IntegerEnum::values()).'.'); |
|
| 608 | 608 | $this->assertInvalidValueExceptionErrorCode(0, ErrorCode::INVALID_CHOICE); |
| 609 | 609 | $this->assertInvalidValueExceptionPropertyPath(0, 'value'); |
| 610 | 610 | $this->createHydrator()->hydrate($object, ['value' => 42]); |
@@ -741,7 +741,7 @@ discard block |
||
| 741 | 741 | |
| 742 | 742 | $this->assertInvalidValueExceptionCount(1); |
| 743 | 743 | // phpcs:ignore Generic.Files.LineLength |
| 744 | - $this->assertInvalidValueExceptionMessage(0, 'This value is not a valid choice; expected values: ' . join(', ', Fixture\StringEnum::values()) . '.'); |
|
| 744 | + $this->assertInvalidValueExceptionMessage(0, 'This value is not a valid choice; expected values: '.join(', ', Fixture\StringEnum::values()).'.'); |
|
| 745 | 745 | $this->assertInvalidValueExceptionErrorCode(0, ErrorCode::INVALID_CHOICE); |
| 746 | 746 | $this->assertInvalidValueExceptionPropertyPath(0, 'value'); |
| 747 | 747 | $this->createHydrator()->hydrate($object, ['value' => 'foo']); |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | { |
| 894 | 894 | $object = new class { |
| 895 | 895 | /** @Subtype(BuiltinType::BOOL, allowsNull=true) */ |
| 896 | - #[Subtype(BuiltinType::BOOL, allowsNull: true)] |
|
| 896 | + #[Subtype(BuiltinType::BOOL, allowsNull : true)] |
|
| 897 | 897 | public array $value; |
| 898 | 898 | }; |
| 899 | 899 | |
@@ -1278,7 +1278,7 @@ discard block |
||
| 1278 | 1278 | { |
| 1279 | 1279 | $object = new class { |
| 1280 | 1280 | /** @Subtype(BuiltinType::BOOL, allowsNull=true) */ |
| 1281 | - #[Subtype(BuiltinType::BOOL, allowsNull: true)] |
|
| 1281 | + #[Subtype(BuiltinType::BOOL, allowsNull : true)] |
|
| 1282 | 1282 | public Fixture\Collection $value; |
| 1283 | 1283 | }; |
| 1284 | 1284 | |
@@ -2049,7 +2049,7 @@ discard block |
||
| 2049 | 2049 | |
| 2050 | 2050 | $this->assertInvalidValueExceptionCount(1); |
| 2051 | 2051 | // phpcs:ignore Generic.Files.LineLength |
| 2052 | - $this->assertInvalidValueExceptionMessage(0, 'This value is not a valid choice; expected values: ' . join(', ', Fixture\MyclabsEnum::toArray()) . '.'); |
|
| 2052 | + $this->assertInvalidValueExceptionMessage(0, 'This value is not a valid choice; expected values: '.join(', ', Fixture\MyclabsEnum::toArray()).'.'); |
|
| 2053 | 2053 | $this->assertInvalidValueExceptionErrorCode(0, ErrorCode::INVALID_CHOICE); |
| 2054 | 2054 | $this->assertInvalidValueExceptionPropertyPath(0, 'value'); |
| 2055 | 2055 | $this->createHydrator()->hydrate($object, ['value' => 'foo']); |