From 791ef1cd465597ff43dab4216c4b00e9e4160da8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 6 Aug 2026 06:25:10 +0900 Subject: refactor(php-shim): split in_array into strict and loose variants --- crates/shirabe/src/command/base_command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/command/base_command.rs') diff --git a/crates/shirabe/src/command/base_command.rs b/crates/shirabe/src/command/base_command.rs index 41b8d0f8..7a66862e 100644 --- a/crates/shirabe/src/command/base_command.rs +++ b/crates/shirabe/src/command/base_command.rs @@ -28,7 +28,7 @@ use shirabe_external_packages::symfony::console::input::InputInterface; use shirabe_external_packages::symfony::console::output::OutputInterface; use shirabe_php_shim::{ InvalidArgumentException, LogicException, PhpClass, PhpMixed, RuntimeException, - UnexpectedValueException, count, explode, in_array, is_string, + UnexpectedValueException, count, explode, in_array_strict, is_string, }; pub const SUCCESS: i64 = 0; @@ -663,7 +663,7 @@ impl BaseCommand for BaseCommandData { .iter() .map(|s| PhpMixed::String(s.to_string())) .collect(); - if !in_array(val.clone(), &PhpMixed::List(formats), true) { + if !in_array_strict(val.clone(), &formats) { return Err(InvalidArgumentException { message: format!( "--{} must be one of {}.", -- cgit v1.3.1