<?php

namespace App\Modules\ExternalReview\Application;

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

class ExternalReviewInserter
{
    private ExternalReviewRepository $repository;

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

    public function __invoke(InsertExternalReview $model)
    {
        return $this->repository->insert($model);
    }
}
