. */ namespace FireflyIII\Support\Binder; use Illuminate\Routing\Route; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Class EitherConfigKey */ class EitherConfigKey { public static array $static = [ 'firefly.version', 'firefly.api_version', 'firefly.default_location', 'firefly.account_to_transaction', 'firefly.allowed_opposing_types', ]; /** * @param string $value * @param Route $route * * @return string * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public static function routeBinder(string $value, Route $route): string { if (in_array($value, self::$static, true) || in_array($value, DynamicConfigKey::$accepted, true)) { return $value; } throw new NotFoundHttpException; } }