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