$this->isSuccess() ? $this->match->route->method : null; } public array $params { get => $this->isSuccess() ? $this->match->route->parameters : []; } public function __construct( public readonly RouteMatch $match, public readonly Method $method, public readonly string $path ) {} public function isSuccess(): bool { return $this->match instanceof RouteMatchSuccess; } }