diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-06 06:25:10 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-06 06:25:30 +0900 |
| commit | 791ef1cd465597ff43dab4216c4b00e9e4160da8 (patch) | |
| tree | ec6c3bc45f81576146325350faa6dcea638987b4 /crates/shirabe/src/repository/vcs/github_driver.rs | |
| parent | a86bbd67954f7bbc38bb09138edb335d82666526 (diff) | |
| download | php-shirabe-791ef1cd465597ff43dab4216c4b00e9e4160da8.tar.gz php-shirabe-791ef1cd465597ff43dab4216c4b00e9e4160da8.tar.zst php-shirabe-791ef1cd465597ff43dab4216c4b00e9e4160da8.zip | |
refactor(php-shim): split in_array into strict and loose variants
Diffstat (limited to 'crates/shirabe/src/repository/vcs/github_driver.rs')
| -rw-r--r-- | crates/shirabe/src/repository/vcs/github_driver.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/crates/shirabe/src/repository/vcs/github_driver.rs b/crates/shirabe/src/repository/vcs/github_driver.rs index c7b84e51..d656ae61 100644 --- a/crates/shirabe/src/repository/vcs/github_driver.rs +++ b/crates/shirabe/src/repository/vcs/github_driver.rs @@ -17,7 +17,7 @@ use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ InvalidArgumentException, PhpMixed, RuntimeException, array_diff, array_key_exists, array_map, - array_search_mixed, base64_decode, basename, empty, explode, extension_loaded, in_array, + array_search_mixed, base64_decode, basename, empty, explode, extension_loaded, in_array_loose, parse_url_all, php_regex, strpos, strtolower, substr, trim, urlencode, }; @@ -966,14 +966,9 @@ impl GitHubDriver { .cloned() .unwrap_or_default() }); - if !in_array( - PhpMixed::String(strtolower(&Preg::replace( - php_regex!(r"{^www\.}i"), - "", - &origin_url, - ))), - &config.borrow().get("github-domains"), - false, + if !in_array_loose( + strtolower(&Preg::replace(php_regex!(r"{^www\.}i"), "", &origin_url)), + config.borrow().get("github-domains").values(), ) { return Ok(false); } |
