| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function validateEntity($entity, $groups = null): bool |
||
| 36 | { |
||
| 37 | $violations = $this->validator->validate($entity, null, $groups); |
||
| 38 | if (\count($violations) > 0) { |
||
| 39 | throw new ValidationException( |
||
| 40 | sprintf('Entity %s does not validate to spezification', \get_class($entity)), |
||
| 41 | 0, |
||
| 42 | null, |
||
| 43 | $violations |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | return true; |
||
| 48 | } |
||
| 55 |