| Conditions | 5 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function parseSchema() |
||
| 31 | { |
||
| 32 | if (!isset($this->schema['type'])) { |
||
| 33 | throw new Exceptions\NoTypeException(); |
||
| 34 | } |
||
| 35 | |||
| 36 | if (!in_array($this->schema['type'], $this->validTypes)) { |
||
| 37 | throw new Exceptions\InvalidTypeException(); |
||
| 38 | } |
||
| 39 | |||
| 40 | if (!isset($this->schema['properties'])) { |
||
| 41 | throw new Exceptions\NoPropertiesException(); |
||
| 42 | } |
||
| 43 | |||
| 44 | if (!isset($this->schema['id'])) { |
||
| 45 | throw new Exceptions\NoIdException(); |
||
| 46 | } |
||
| 47 | } |
||
| 48 | } |
||
| 49 |