aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-06 05:25:35 +0900
committernsfisis <nsfisis@gmail.com>2026-08-06 05:25:35 +0900
commitf8f6172228ae5aa89fae7ddf34c52f82bbff309f (patch)
tree284b7c39fdb0c8cfe51cb64e4c2e2a6a6bf181cc /crates/shirabe/src
parent0b227a4c623c72c155b1622674b78ca5cc0c4f8b (diff)
downloadphp-shirabe-f8f6172228ae5aa89fae7ddf34c52f82bbff309f.tar.gz
php-shirabe-f8f6172228ae5aa89fae7ddf34c52f82bbff309f.tar.zst
php-shirabe-f8f6172228ae5aa89fae7ddf34c52f82bbff309f.zip
refactor(class-map-generator): narrow scanPaths' $path to a string
The docblock allows string|iterable<SplFileInfo>, but every call site in Composer passes a string, so the iterable branch was only a todo!(). Taking &str drops it together with the InvalidArgumentException that the type now rules out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src')
-rw-r--r--crates/shirabe/src/autoload/autoload_generator.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/shirabe/src/autoload/autoload_generator.rs b/crates/shirabe/src/autoload/autoload_generator.rs
index ef026d72..93dbca09 100644
--- a/crates/shirabe/src/autoload/autoload_generator.rs
+++ b/crates/shirabe/src/autoload/autoload_generator.rs
@@ -358,7 +358,7 @@ impl AutoloadGenerator {
for dir in &classmap_list {
let dir_str = dir.as_string().unwrap_or("");
class_map_generator.scan_paths(
- PhpMixed::String(dir_str.to_string()),
+ dir_str,
self.build_exclusion_regex(dir_str, excluded.clone()),
"classmap",
None,
@@ -426,7 +426,7 @@ impl AutoloadGenerator {
};
class_map_generator.scan_paths(
- PhpMixed::String(dir_str.clone()),
+ &dir_str,
exclusion_regex,
&group_type,
Some(namespace.clone()),
@@ -908,7 +908,7 @@ impl AutoloadGenerator {
let dir_str = dir.as_string().unwrap_or("");
let res = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
class_map_generator.scan_paths(
- PhpMixed::String(dir_str.to_string()),
+ dir_str,
self.build_exclusion_regex(dir_str, excluded.clone()),
"classmap",
None,