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/util/gitlab.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'crates/shirabe/src/util/gitlab.rs') diff --git a/crates/shirabe/src/util/gitlab.rs b/crates/shirabe/src/util/gitlab.rs index 2b23cdbf..c14ad46a 100644 --- a/crates/shirabe/src/util/gitlab.rs +++ b/crates/shirabe/src/util/gitlab.rs @@ -11,7 +11,7 @@ use crate::util::ProcessExecutor; use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::Preg; use shirabe_php_shim::{ - PhpMixed, RuntimeException, http_build_query, in_array, json_decode, php_regex, time, + PhpMixed, RuntimeException, http_build_query, in_array_strict, json_decode, php_regex, time, }; #[derive(Debug)] @@ -55,15 +55,9 @@ impl GitLab { let bc_origin_url = Preg::replace(php_regex!("{:\\d+}"), "", origin_url); let gitlab_domains = self.config.borrow_mut().get("gitlab-domains"); - if !in_array( - PhpMixed::String(origin_url.to_string()), - &gitlab_domains, - true, - ) && !in_array( - PhpMixed::String(bc_origin_url.clone()), - &gitlab_domains, - true, - ) { + if !in_array_strict(origin_url.to_string(), gitlab_domains.values()) + && !in_array_strict(bc_origin_url.clone(), gitlab_domains.values()) + { return false; } -- cgit v1.3.1