| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function removeSubscribers(User $user, array $subscribers) |
||
| 36 | { |
||
| 37 | $qb = $this->createQueryBuilder('s'); |
||
| 38 | $qb |
||
| 39 | ->delete() |
||
| 40 | ->where('s.author = :author') |
||
| 41 | ->andWhere('s.subscriber IN (:subscribers)') |
||
| 42 | ->setParameter('author', $user->getId()) |
||
| 43 | ->setParameter('subscribers', $subscribers) |
||
| 44 | ->getQuery()->execute(); |
||
| 45 | ; |
||
| 46 | } |
||
| 47 | } |