. */ declare(strict_types=1); namespace FireflyIII\Support\Binder; use Illuminate\Routing\Route; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Class ConfigurationName */ class ConfigurationName implements BinderInterface { /** * @param string $value * @param Route $route * * @return string * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public static function routeBinder(string $value, Route $route): string { $accepted = ['is_demo_site', 'permission_update_check', 'single_user_mode']; if (in_array($value, $accepted, true)) { return $value; } throw new NotFoundHttpException; } }