From f05e1a55cf0d44e9611e06a3d7b4fccdcb90ce7b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 17:42:32 +0900 Subject: 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) --- crates/shirabe/src/command/home_command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/command/home_command.rs') 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; } -- cgit v1.3.1