| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function countViewsByCustomer(CustomerInterface $customer): int |
||
| 13 | { |
||
| 14 | return (int) $this->createQueryBuilder('o') |
||
| 15 | ->select('COUNT(o.id)') |
||
| 16 | ->innerJoin('o.affiliate', 'a') |
||
| 17 | ->andWhere('a.customer = :customer') |
||
| 18 | ->setParameter('customer', $customer) |
||
| 19 | ->getQuery() |
||
| 20 | ->getSingleScalarResult() |
||
| 21 | ; |
||
| 22 | } |
||
| 24 |