| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function isValid() |
||
| 37 | { |
||
| 38 | $value = $this->getValue(); |
||
| 39 | if (!$value && $this->isRequired() === self::OPTIONAL) { |
||
| 40 | return true; |
||
| 41 | } |
||
| 42 | $value = json_decode(json_encode($value)); |
||
| 43 | $this->schemaValidator->validate($value, json_decode($this->schema)); |
||
| 44 | return $this->schemaValidator->isValid(); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |