| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | final class AlbumRepository extends EntityRepository implements AlbumRepositoryInterface |
||
| 17 | { |
||
| 18 | 1 | public function prototype(): AlbumInterface |
|
| 21 | } |
||
| 22 | |||
| 23 | 1 | public function save(AlbumInterface $album): void |
|
| 24 | { |
||
| 25 | 1 | $em = $this->getEntityManager(); |
|
| 26 | |||
| 27 | 1 | $em->persist($album); |
|
| 28 | 1 | $em->flush(); |
|
| 29 | 1 | } |
|
| 30 | |||
| 31 | 1 | public function findByMbId(string $mbid): ?AlbumInterface |
|
| 32 | { |
||
| 33 | 1 | return $this->findOneBy([ |
|
| 34 | 1 | 'mbid' => $mbid |
|
| 35 | ]); |
||
| 36 | } |
||
| 37 | |||
| 38 | 1 | public function delete(AlbumInterface $album): void |
|
| 44 | 1 | } |
|
| 45 | } |
||
| 46 |