Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
TelegramLinkRepository | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
getActivatedTelegramLinks | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Olz\Repository; |
4 | |
5 | use Olz\Entity\TelegramLink; |
6 | use Olz\Repository\Common\OlzRepository; |
7 | |
8 | /** |
9 | * @extends OlzRepository<TelegramLink> |
10 | */ |
11 | class TelegramLinkRepository extends OlzRepository { |
12 | protected string $telegram_link_class = TelegramLink::class; |
13 | |
14 | /** @return array<TelegramLink> */ |
15 | public function getActivatedTelegramLinks(): array { |
16 | $dql = " |
17 | SELECT tl |
18 | FROM {$this->telegram_link_class} tl |
19 | WHERE ( |
20 | tl.user IS NOT NULL |
21 | AND tl.telegram_chat_id IS NOT NULL |
22 | )"; |
23 | $query = $this->getEntityManager()->createQuery($dql); |
24 | return $query->getResult(); |
25 | } |
26 | } |