| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 8 | public function __construct(?array $oneOfs) |
|
| 16 | { |
||
| 17 | 8 | if (null === $oneOfs) { |
|
|
|
|||
| 18 | 8 | parent::__construct(static::NAME, null); |
|
| 19 | |||
| 20 | 8 | return; |
|
| 21 | } |
||
| 22 | |||
| 23 | 8 | Assert::isNonEmptyList($oneOfs); |
|
| 24 | 8 | Assert::allIsInstanceOf($oneOfs, SchemaInterface::class); |
|
| 25 | |||
| 26 | 8 | parent::__construct(static::NAME, array_map( |
|
| 27 | 8 | function (SchemaInterface $schemaMetadata) { |
|
| 28 | 8 | return $schemaMetadata->toJsonSchema(); |
|
| 29 | 8 | }, |
|
| 30 | $oneOfs |
||
| 31 | )); |
||
| 34 |