aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/home_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 17:42:32 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 17:42:32 +0900
commitf05e1a55cf0d44e9611e06a3d7b4fccdcb90ce7b (patch)
treeb93311ab2473b988051f0285efb7181afe301fe5 /crates/shirabe/src/command/home_command.rs
parent277dc4065d2eb0d6621a6aa56a299a0d2369caf7 (diff)
downloadphp-shirabe-f05e1a55cf0d44e9611e06a3d7b4fccdcb90ce7b.tar.gz
php-shirabe-f05e1a55cf0d44e9611e06a3d7b4fccdcb90ce7b.tar.zst
php-shirabe-f05e1a55cf0d44e9611e06a3d7b4fccdcb90ce7b.zip
refactor(php-shim): split filter_var into per-filter functions
Replace the dispatch-on-constant filter_var() and filter_var_with_options() with dedicated filter_var_boolean/url/email/ip and filter_var_int_with_range, dropping the FILTER_VALIDATE_* constants and updating all call sites. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/home_command.rs')
-rw-r--r--crates/shirabe/src/command/home_command.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/home_command.rs b/crates/shirabe/src/command/home_command.rs
index 1620205..5b05815 100644
--- a/crates/shirabe/src/command/home_command.rs
+++ b/crates/shirabe/src/command/home_command.rs
@@ -6,7 +6,7 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::PhpMixed;
-use shirabe_php_shim::{FILTER_VALIDATE_URL, filter_var};
+use shirabe_php_shim::filter_var_url;
use std::cell::RefCell;
use std::rc::Rc;
@@ -73,7 +73,7 @@ impl HomeCommand {
Some(u) => u,
};
- if !filter_var(&url, FILTER_VALIDATE_URL) {
+ if !filter_var_url(&url) {
return false;
}