| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function check($definitions) |
||
| 45 | { |
||
| 46 | $raw_data = $this->getBody(); |
||
| 47 | $validator = $this->getValidator(); |
||
| 48 | |||
| 49 | $validator->check($raw_data, $definitions); |
||
| 50 | |||
| 51 | if (!$validator->isValid()) { |
||
| 52 | throw new UnprocessableException($validator->getErrors()); |
||
| 53 | } |
||
| 54 | |||
| 55 | $this->setData($raw_data); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |