private function findCartsByUser($user, $locale)
    {
        $cartsArray = $this->orderRepository->findByStatusIdsAndUser(
            $locale,
            array(OrderStatus::STATUS_IN_CART, OrderStatus::STATUS_CART_PENDING),
            $user
        );

        return $cartsArray;
    }
private function findCartsByUser($user, $locale)
    {
        $cartsArray = $this->orderRepository->findByStatusIdsAndUser(
            $locale,
            array(OrderStatus::STATUS_IN_CART, OrderStatus::STATUS_CART_PENDING),
            $user
        );

        return $cartsArray;
    }
private function findCartsByUser ( $ user , $ locale ) { $ cartsArray = $ this -> orderRepository -> findByStatusIdsAndUser ( $ locale , array ( OrderStatus :: STATUS_IN_CART , OrderStatus :: STATUS_CART_PENDING ) , $ user ) ; return $ cartsArray ; }
Finds cart by locale and user

@param string $locale
@param UserInterface $user

@return array|null
Finds cart by locale and user