<?php

declare(strict_types=1);

namespace App\Handler\Api;

use App\Service\YearManager;
use Psr\Container\ContainerInterface;
use Psr\Http\Server\RequestHandlerInterface;

class YearsHandlerFactory
{
    public function __invoke(ContainerInterface $container) : RequestHandlerInterface
    {
        $yearManager = $container->get(YearManager::class);
        return new YearsHandler($yearManager);
    }
}
