| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | protected function notify(array $users, string $content, array $parameters = []) |
||
| 47 | { |
||
| 48 | $notification = |
||
| 49 | (new Notification()) |
||
| 50 | ->setContent($this->translator->trans($content, $parameters)) |
||
| 51 | ; |
||
| 52 | foreach ($users as $user) { |
||
| 53 | $n = clone $notification; |
||
| 54 | $n->setUser($user); |
||
| 55 | $this->em->persist($n); |
||
| 56 | } |
||
| 57 | $this->em->flush(); |
||
| 58 | } |
||
| 59 | } |