| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 25% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class ServiceProviderRepository implements ServiceProviderRepositoryInterface { |
||
| 10 | |||
| 11 | public function __construct(private EntityManagerInterface $em) |
||
| 12 | { |
||
| 13 | 14 | } |
|
| 14 | 14 | ||
| 15 | 14 | /** |
|
| 16 | * @inheritDoc |
||
| 17 | */ |
||
| 18 | public function findAll(): array { |
||
| 19 | return $this->em->getRepository(ServiceProvider::class) |
||
| 20 | ->findAll(); |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @inheritDoc |
||
| 25 | */ |
||
| 26 | public function findOneByEntityId(string $entityId): ?SamlServiceProvider { |
||
| 27 | return $this->em->getRepository(SamlServiceProvider::class) |
||
| 28 | ->findOneBy(['entityId' => $entityId]); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function persist(ServiceProvider $provider): void { |
||
| 32 | $this->em->persist($provider); |
||
| 33 | $this->em->flush(); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function remove(ServiceProvider $provider): void { |
||
| 39 | } |
||
| 40 | } |