| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 29 | public function countByVariant(ProductVariantInterface $variant): int |
||
| 30 | { |
||
| 31 | return (int) ($this->baseOrderItemRepository |
||
| 32 | ->createQueryBuilder('oi') |
||
| 33 | ->select('SUM(oi.quantity)') |
||
| 34 | ->join('oi.order', 'o') |
||
| 35 | ->select('SUM(oi.quantity)') |
||
| 36 | ->where('oi.variant = :variant') |
||
| 37 | ->andWhere('o.state NOT IN (:states)') |
||
| 38 | ->setParameter('variant', $variant) |
||
| 39 | ->setParameter('states', [OrderInterface::STATE_CANCELLED, OrderInterface::STATE_CART]) |
||
| 40 | ->getQuery() |
||
| 41 | ->getSingleScalarResult()); |
||
| 42 | } |
||
| 44 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..