<?php

declare(strict_types=1);

/*
 * Chill is a software for social workers
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

namespace Chill\TicketBundle\Repository;

use Chill\TicketBundle\Entity\Ticket;
use Chill\PersonBundle\Entity\Person;
use Doctrine\Persistence\ObjectRepository;

/**
 * @extends ObjectRepository<Ticket>
 */
interface TicketRepositoryInterface extends ObjectRepository
{
    public function findOneByExternalRef(string $extId): ?Ticket;

    /**
     * @return list<Ticket>
     */
    public function findAllOrdered(): array;

    public function countOpenedByPerson(Person $person): int;
}
