| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class TenantRepository extends ServiceEntityRepository implements TenantRepositoryInterface |
||
| 12 | { |
||
| 13 | private string $tenantClass; |
||
| 14 | |||
| 15 | public function __construct(ManagerRegistry $registry, string $tenantClass) |
||
| 19 | } |
||
| 20 | |||
| 21 | public function findById($id): ?TenantInterface |
||
| 22 | { |
||
| 23 | return $this->findOneBy(['id' => $id]); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function findByClientKey(string $clientKey): ?TenantInterface |
||
| 29 | } |
||
| 30 | |||
| 31 | public function save(TenantInterface $tenant): void |
||
| 32 | { |
||
| 33 | $this->getEntityManager()->persist($tenant); |
||
| 34 | $this->getEntityManager()->flush(); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function initializeTenant(): TenantInterface |
||
| 40 | } |
||
| 41 | } |
||
| 42 |