| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function retrieve( |
||
| 23 | int $limit, |
||
| 24 | ?CatalogInterface $catalog = null, |
||
| 25 | ?GenreInterface $genre = null, |
||
| 26 | ?int $fromYear = null, |
||
| 27 | ?int $toYear = null, |
||
| 28 | ): array { |
||
| 29 | $list = $this->songRepository->findAll(); |
||
| 30 | // @todo inefficient, but doctrine doesn't support RAND order natively |
||
| 31 | shuffle($list); |
||
| 32 | |||
| 33 | return array_slice($list, 0, $limit); |
||
| 34 | } |
||
| 36 |