<?php

namespace App\Modules\ExternalReview\Application;

use App\Modules\ExternalReview\Domain\ExternalReviewRepository;
use App\Modules\ExternalReview\Domain\IdExternalReview;

class ExternalReviewIndexer
{

    private ExternalReviewRepository $repository;

    public function __construct(ExternalReviewRepository $repository)
    {
        $this->repository = $repository;
    }

    public function __invoke(IdExternalReview $idExternalReview)
    {
        return $this->repository->index($idExternalReview);
    }
}
