username ?? null; if (isset($username)) { return "/_security/user/$username/_disable"; } throw new RuntimeException('Missing parameter for the endpoint security.disable_user'); } public function getParamWhitelist(): array { return [ 'refresh' ]; } public function getMethod(): string { return 'PUT'; } public function setUsername($username): DisableUser { if (isset($username) !== true) { return $this; } $this->username = $username; return $this; } }