<?php

namespace Lc\SovBundle\Repository\Ticket;

use Lc\SovBundle\Repository\AbstractStore;

class TicketStore extends AbstractStore implements TicketStoreInterface
{
    protected TicketRepositoryQueryInterface $query;

    public function __construct(TicketRepositoryQueryInterface $query)
    {
        $this->query = $query;
    }

    // getTicketsByUser
    public function getByUser($user)
    {
        $query = $this->query->create();

        $query->filterByUser($user);

        return $query->find();
    }
}
