<?php

declare(strict_types=1);

namespace App\Module\Directory\Infrastructure\Doctrine;

use App\Module\Directory\Domain\Entity\Prestataire;
use App\Module\Directory\Domain\Repository\PrestataireRepositoryInterface;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
 * @extends ServiceEntityRepository<Prestataire>
 */
final class DoctrinePrestataireRepository extends ServiceEntityRepository implements PrestataireRepositoryInterface
{
    public function __construct(ManagerRegistry $registry)
    {
        parent::__construct($registry, Prestataire::class);
    }

    public function findById(int $id): ?Prestataire
    {
        return $this->find($id);
    }
}
