<?php

namespace App\Modules\PassengerReview\Application;

use App\Modules\PassengerReview\Domain\IdPassengerReview;
use App\Modules\PassengerReview\Domain\PassengerReviewRemoveRepository;

class PassengerReviewRemove
{
    private PassengerReviewRemoveRepository $repository;

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

    public function __invoke(int $idReview)
    {
        return $this->repository->remove(new IdPassengerReview($idReview));
    }
}
