Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function getOneNonOrderedCartByCustomer(SkuskuCustomerInterface $customer = null) |
||
32 | { |
||
33 | if ( !$customer ) { |
||
34 | return null; |
||
35 | } |
||
36 | |||
37 | $qb = $this->createQueryBuilder('c') |
||
38 | ->where('c.status = :status') |
||
39 | ->andWhere('c.customer = :customer') |
||
40 | ->setParameter('status', SkuskuCart::STATUS_INITIAL) |
||
41 | ->setParameter('customer', $customer) |
||
42 | ->setMaxResults(1) |
||
43 | ->getQuery(); |
||
44 | |||
45 | return $qb->getOneOrNullResult(); |
||
46 | } |
||
48 |