<?php

declare(strict_types=1);

namespace App\Module\ProjectManagement\Infrastructure\Doctrine;

use App\Module\ProjectManagement\Domain\Entity\TaskGroup;
use App\Module\ProjectManagement\Domain\Repository\TaskGroupRepositoryInterface;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
 * @extends ServiceEntityRepository<TaskGroup>
 */
class DoctrineTaskGroupRepository extends ServiceEntityRepository implements TaskGroupRepositoryInterface
{
    public function __construct(ManagerRegistry $registry)
    {
        parent::__construct($registry, TaskGroup::class);
    }

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