| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function resolveDomain(?string $domain): ?Domain |
||
| 21 | { |
||
| 22 | if ($domain === null) { |
||
| 23 | return null; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** @var Domain|null $existingDomain */ |
||
| 27 | $existingDomain = $this->em->getRepository(Domain::class)->findOneBy(['authority' => $domain]); |
||
| 28 | return $existingDomain ?? new Domain($domain); |
||
| 29 | } |
||
| 42 |