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/downloader/git_downloader.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/downloader/git_downloader.rs') diff --git a/crates/shirabe/src/downloader/git_downloader.rs b/crates/shirabe/src/downloader/git_downloader.rs index e9c70da3..0becf427 100644 --- a/crates/shirabe/src/downloader/git_downloader.rs +++ b/crates/shirabe/src/downloader/git_downloader.rs @@ -19,8 +19,8 @@ use crate::util::Url; use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ - PhpMixed, RuntimeException, array_map, basename, dirname, implode, in_array, is_dir, php_regex, - preg_quote, realpath, rtrim, strlen, strpos, substr, trim, version_compare, + PhpMixed, RuntimeException, array_map, basename, dirname, implode, in_array_strict, is_dir, + php_regex, preg_quote, realpath, rtrim, strlen, strpos, substr, trim, version_compare, }; #[derive(Debug)] @@ -537,7 +537,7 @@ impl GitDownloader { .cloned() .unwrap_or_default(); let mut push_url = format!("git@{}:{}/{}.git", m1, m2, m3); - if !in_array(PhpMixed::String("ssh".to_string()), &protocols, true) { + if !in_array_strict("ssh".to_string(), protocols.values()) { push_url = format!("https://{}/{}/{}.git", m1, m2, m3); } let cmd = vec![ -- cgit v1.3.1