From 38621c67917fd015f884ea04517791cdc5058c6d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 11 Aug 2026 23:28:40 +0900 Subject: chore(php-shim): drop the substring predicate ports str_contains(), str_starts_with() and str_ends_with() were thin wrappers over the str methods of the same semantics. Call sites now use contains()/starts_with()/ends_with() directly. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe-class-map-generator/src/class_map_generator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe-class-map-generator/src') diff --git a/crates/shirabe-class-map-generator/src/class_map_generator.rs b/crates/shirabe-class-map-generator/src/class_map_generator.rs index 0042a0a1..2207416b 100644 --- a/crates/shirabe-class-map-generator/src/class_map_generator.rs +++ b/crates/shirabe-class-map-generator/src/class_map_generator.rs @@ -8,7 +8,7 @@ use shirabe_pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ InvalidArgumentException, LogicException, PATHINFO_EXTENSION, RuntimeException, explode, getcwd, implode, is_dir, is_file, pathinfo, php_regex, preg_quote, realpath, str_replace, - str_starts_with, stream_get_wrappers, strlen, strpos, strrpos, strtr, substr, + stream_get_wrappers, strlen, strpos, strrpos, strtr, substr, }; use shirabe_symfony_finder::Finder; use std::path::PathBuf; @@ -254,7 +254,7 @@ impl ClassMapGenerator { let sub_path: String; if namespace_type == "psr-0" { - if !base_namespace.is_empty() && !str_starts_with(&class, base_namespace) { + if !base_namespace.is_empty() && !class.starts_with(base_namespace) { rejected_classes.push(class); continue; } -- cgit v1.3.1-4-g156e