Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
WeeklyPictureRepository | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
getLatestThree | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Olz\Repository\Startseite; |
4 | |
5 | use Olz\Entity\Startseite\WeeklyPicture; |
6 | use Olz\Repository\Common\OlzRepository; |
7 | |
8 | /** |
9 | * @extends OlzRepository<WeeklyPicture> |
10 | */ |
11 | class WeeklyPictureRepository extends OlzRepository { |
12 | /** @return array<WeeklyPicture> */ |
13 | public function getLatestThree(): array { |
14 | $dql = " |
15 | SELECT wp |
16 | FROM Olz\\Entity\\Startseite\\WeeklyPicture wp |
17 | WHERE wp.on_off = 1 |
18 | ORDER BY wp.datum DESC |
19 | "; |
20 | $query = $this->getEntityManager()->createQuery($dql)->setMaxResults(3); |
21 | return $query->getResult(); |
22 | } |
23 | } |