index ?? null; if (isset($index)) { return "/$index/_flush"; } return "/_flush"; } public function getParamWhitelist(): array { return [ 'force', 'wait_if_ongoing', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards' ]; } public function getMethod(): string { return 'POST'; } }