<?php

namespace App\Modules\Tour\Application\ListToursByType;

use App\Modules\Tour\Domain\TourRepository;
use App\Modules\Tour\Domain\ToursByType;

class ToursByTypeLister
{
    public function __construct(
        private TourRepository $tourRepository
    ) {}

    public function __invoke($typeTourId): array
    {
        return $this->tourRepository->search(new ToursByType($typeTourId));
    }
}
