| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 32 | public function getSaverForEntity( |
||
| 33 | EntityInterface $entity |
||
| 34 | ): EntitySaverInterface { |
||
| 35 | $saverFqn = $this->getSaverFqn($entity); |
||
| 36 | if (class_exists($saverFqn)) { |
||
| 37 | return new $saverFqn($this->entityManager); |
||
| 38 | } |
||
| 39 | if (null === $this->genericEntitySaver) { |
||
| 40 | $this->genericEntitySaver = new EntitySaver($this->entityManager); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $this->genericEntitySaver; |
||
| 44 | } |
||
| 64 |