From cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 00:31:45 +0900 Subject: feat(php-shim): implement count() Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/json/json_manipulator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src/json/json_manipulator.rs') diff --git a/crates/shirabe/src/json/json_manipulator.rs b/crates/shirabe/src/json/json_manipulator.rs index a3c0a16..3bc5725 100644 --- a/crates/shirabe/src/json/json_manipulator.rs +++ b/crates/shirabe/src/json/json_manipulator.rs @@ -556,7 +556,7 @@ impl JsonManipulator { .get(name) .map(|v| v.as_bool() == Some(false)) .unwrap_or(false) - && 1 == count(&PhpMixed::Array(repository_as_array.clone())) + && 1 == repository_as_array.len() { let idx: i64 = repository_index.parse().unwrap_or(0); if !self.remove_list_item("repositories", idx)? { -- cgit v1.3.1