| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | protected function persist(ObjectManager $manager, object $entity, bool $skipValidation = false): void |
||
| 20 | { |
||
| 21 | if (!$skipValidation) { |
||
| 22 | $errors = $this->validator->validate($entity); |
||
| 23 | if (\count($errors)) { |
||
| 24 | throw new InvalidEntityException($errors); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | $manager->persist($entity); |
||
| 28 | } |
||
| 30 |