Skip to content

Commit

Permalink
CR fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leszczuu committed Dec 1, 2020
1 parent 9b5f8b6 commit 2b28038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Repository/OrderItemRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public function __construct(EntityRepository $baseOrderItemRepository)

public function countByVariant(ProductVariantInterface $variant, array $orderStates = []): int
{
if (!$orderStates) {
if (empty($orderStates)) {
$orderStates = [OrderInterface::STATE_CANCELLED, OrderInterface::STATE_CART];
}

return (int) ($this->baseOrderItemRepository
->createQueryBuilder('oi')
->select('SUM(oi.quantity)')
Expand Down

0 comments on commit 2b28038

Please sign in to comment.