| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function findOpenedCustomerOrder(Customer $param) |
||
| 17 | { |
||
| 18 | return $this->createQueryBuilder('o') |
||
| 19 | ->join('o.customer', 'c') |
||
| 20 | ->where('o.status = :opened') |
||
| 21 | ->andWhere('c.id = :param') |
||
| 22 | ->setParameter(':param', $param->getId()) |
||
| 23 | ->setParameter(':opened', 'opened') |
||
| 24 | ->orderBy('o.id', 'DESC') |
||
| 25 | ->setMaxResults(1) |
||
| 26 | ->getQuery() |
||
| 27 | ->getOneOrNullResult() |
||
| 28 | ; |
||
| 29 | } |
||
| 30 | } |
||
| 31 |