@@ -70,22 +70,22 @@ discard block |
||
| 70 | 70 | foreach ($type['params'] as $possibleType) { |
| 71 | 71 | $finalType = null; |
| 72 | 72 | |
| 73 | - if (!$context->getMetadataStack()->isEmpty()) { |
|
| 73 | + if ( ! $context->getMetadataStack()->isEmpty()) { |
|
| 74 | 74 | $propertyMetadata = $context->getMetadataStack()->top(); |
| 75 | 75 | if (null !== $propertyMetadata->unionDiscriminatorField) { |
| 76 | - if (!array_key_exists($propertyMetadata->unionDiscriminatorField, $data)) { |
|
| 77 | - throw new NonVisitableTypeException('Union Discriminator Field \'' . $propertyMetadata->unionDiscriminatorField . '\' not found in data'); |
|
| 76 | + if ( ! array_key_exists($propertyMetadata->unionDiscriminatorField, $data)) { |
|
| 77 | + throw new NonVisitableTypeException('Union Discriminator Field \''.$propertyMetadata->unionDiscriminatorField.'\' not found in data'); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $lkup = $data[$propertyMetadata->unionDiscriminatorField]; |
| 81 | - if (!empty($propertyMetadata->unionDiscriminatorMap)) { |
|
| 81 | + if ( ! empty($propertyMetadata->unionDiscriminatorMap)) { |
|
| 82 | 82 | if (array_key_exists($lkup, $propertyMetadata->unionDiscriminatorMap)) { |
| 83 | 83 | $finalType = [ |
| 84 | 84 | 'name' => $propertyMetadata->unionDiscriminatorMap[$lkup], |
| 85 | 85 | 'params' => [], |
| 86 | 86 | ]; |
| 87 | 87 | } else { |
| 88 | - throw new NonVisitableTypeException('Union Discriminator Map does not contain key \'' . $lkup . '\''); |
|
| 88 | + throw new NonVisitableTypeException('Union Discriminator Map does not contain key \''.$lkup.'\''); |
|
| 89 | 89 | } |
| 90 | 90 | } else { |
| 91 | 91 | $finalType = [ |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | private function matchSimpleType(mixed $data, array $type, Context $context): mixed |
| 114 | 114 | { |
| 115 | 115 | foreach ($type['params'] as $possibleType) { |
| 116 | - if ($this->isPrimitiveType($possibleType['name']) && !$this->testPrimitive($data, $possibleType['name'], $context->getFormat())) { |
|
| 116 | + if ($this->isPrimitiveType($possibleType['name']) && ! $this->testPrimitive($data, $possibleType['name'], $context->getFormat())) { |
|
| 117 | 117 | continue; |
| 118 | 118 | } |
| 119 | 119 | |