From fce44d4587ba11b080fe0266c483d0be684ffd0d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 16 Aug 2026 12:51:24 +0900 Subject: refactor(php-shim): split json_decode into assoc and obj variants The assoc flag was always a literal at every call site, so the boolean carried no information the function name could not. json_decode_assoc and json_decode_obj make the resulting PhpMixed shape visible at the call site. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/util/http/curl_downloader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src/util/http/curl_downloader.rs') diff --git a/crates/shirabe/src/util/http/curl_downloader.rs b/crates/shirabe/src/util/http/curl_downloader.rs index 742e0fd3..6140bb08 100644 --- a/crates/shirabe/src/util/http/curl_downloader.rs +++ b/crates/shirabe/src/util/http/curl_downloader.rs @@ -339,7 +339,7 @@ impl CurlDownloader { && curl_response.inner.get_header("content-type").as_deref() == Some("application/json") && let Some(body) = curl_response.inner.get_body() { - let decoded = shirabe_php_shim::json_decode(body, true)?; + let decoded = shirabe_php_shim::json_decode_assoc(body)?; if let PhpMixed::Array(a) = decoded { HttpDownloader::output_warnings(self.io.clone(), origin, &a)?; } -- cgit v1.3.1-4-g156e