$code, 'details' => $details, ]; if ($metadata) { $status['metadata'] = $metadata; } return $status; } public static function ok(array $metadata = null): array { return Status::status(STATUS_OK, 'OK', $metadata); } public static function unimplemented(): array { return Status::status(STATUS_UNIMPLEMENTED, 'UNIMPLEMENTED'); } }