| Total Complexity | 9 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ObjectSchema extends Schema |
||
| 8 | { |
||
| 9 | public function phpType() |
||
| 12 | } |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @return Schema[] |
||
| 16 | */ |
||
| 17 | public function properties() |
||
| 18 | { |
||
| 19 | $props = []; |
||
| 20 | |||
| 21 | foreach ($this->schema->properties as $name => $schema) { |
||
| 22 | $props[$name] = Schema::make($schema); |
||
| 23 | } |
||
| 24 | |||
| 25 | foreach ($this->schema->oneOf ?: [] as $oneOf) { |
||
| 26 | foreach ($oneOf->properties as $name => $schema) { |
||
| 27 | $props[$name] = Schema::make($schema); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | return $props; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return string[] |
||
| 36 | */ |
||
| 37 | public function required() |
||
| 38 | { |
||
| 39 | return !is_null($this->schema->required) ? $this->schema->required : []; |
||
| 40 | } |
||
| 41 | |||
| 42 | public function isRequired($property) |
||
| 45 | } |
||
| 46 | } |
||
| 47 |