. */ declare(strict_types=1); namespace FireflyIII\Support\Binder; use Carbon\Carbon; use Illuminate\Routing\Route; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Class ImportProvider. */ class ImportProvider implements BinderInterface { /** * @param string $value * @param Route $route * * @return Carbon * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public static function routeBinder(string $value, Route $route): string { $providers = array_keys((array)config('import.enabled')); if (\in_array($value, $providers, true)) { return $value; } throw new NotFoundHttpException; } }