user ?? null; if (isset($user)) { return "/_security/user/$user/_has_privileges"; } return "/_security/user/_has_privileges"; } public function getParamWhitelist(): array { return [ ]; } public function getMethod(): string { return isset($this->body) ? 'POST' : 'GET'; } public function setBody($body): HasPrivileges { if (isset($body) !== true) { return $this; } $this->body = $body; return $this; } public function setUser($user): HasPrivileges { if (isset($user) !== true) { return $this; } $this->user = $user; return $this; } }