aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/event_dispatcher
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-24 04:51:47 +0900
committernsfisis <nsfisis@gmail.com>2026-06-24 05:02:54 +0900
commita8623a5e867825400073d2597dfb3118d6624ef7 (patch)
tree7df29f68596765dc3914209e14af4999b721815f /crates/shirabe/src/event_dispatcher
parente87d37a294a4c754585309d391d793a2c9a1287e (diff)
downloadphp-shirabe-a8623a5e867825400073d2597dfb3118d6624ef7.tar.gz
php-shirabe-a8623a5e867825400073d2597dfb3118d6624ef7.tar.zst
php-shirabe-a8623a5e867825400073d2597dfb3118d6624ef7.zip
chore: unwrap meaningless PhpMixed::String()
Diffstat (limited to 'crates/shirabe/src/event_dispatcher')
-rw-r--r--crates/shirabe/src/event_dispatcher/event_dispatcher.rs46
1 files changed, 19 insertions, 27 deletions
diff --git a/crates/shirabe/src/event_dispatcher/event_dispatcher.rs b/crates/shirabe/src/event_dispatcher/event_dispatcher.rs
index d3b5fad..3ef7661 100644
--- a/crates/shirabe/src/event_dispatcher/event_dispatcher.rs
+++ b/crates/shirabe/src/event_dispatcher/event_dispatcher.rs
@@ -343,8 +343,8 @@ impl EventDispatcher {
self.io.write_error3(
&format!(
"> {}: {}",
- PhpMixed::String(formatted_event_name_with_args.clone()),
- PhpMixed::String(format!("{}->{}", prefix, method_name)),
+ formatted_event_name_with_args.clone(),
+ format!("{}->{}", prefix, method_name),
),
true,
crate::io::VERBOSE,
@@ -358,8 +358,8 @@ impl EventDispatcher {
self.io.write_error3(
&format!(
"> {}: {}",
- PhpMixed::String(formatted_event_name_with_args.clone()),
- PhpMixed::String(callable_str.clone()),
+ formatted_event_name_with_args.clone(),
+ callable_str.clone(),
),
true,
crate::io::VERBOSE,
@@ -416,8 +416,8 @@ impl EventDispatcher {
if exit_code != 0 {
self.io.write_error3(&format!(
"<error>Script {} handling the {} event returned with error code {}</error>",
- PhpMixed::String(callable_str.clone()),
- PhpMixed::String(event.get_name().to_string()),
+ callable_str.clone(),
+ event.get_name().to_string(),
exit_code
), true, crate::io::QUIET);
@@ -442,7 +442,7 @@ impl EventDispatcher {
{
self.io.write_error3(&format!(
"<warning>You made a reference to a non-existent script {}</warning>",
- PhpMixed::String(callable_str.clone()),
+ callable_str.clone(),
), true, crate::io::QUIET);
}
@@ -469,8 +469,8 @@ impl EventDispatcher {
self.io.write_error3(
&format!(
"<error>Script {} was called via {}</error>",
- PhpMixed::String(callable_str.clone()),
- PhpMixed::String(event.get_name().to_string()),
+ callable_str.clone(),
+ event.get_name().to_string(),
),
true,
crate::io::QUIET,
@@ -513,8 +513,8 @@ impl EventDispatcher {
self.io.write_error3(
&format!(
"<error>Script {} handling the {} event terminated with an exception</error>",
- PhpMixed::String(callable_str.clone()),
- PhpMixed::String(event.get_name().to_string()),
+ callable_str.clone(),
+ event.get_name().to_string(),
),
true,
crate::io::QUIET,
@@ -613,17 +613,13 @@ impl EventDispatcher {
if self.io.is_verbose() {
self.io.write_error3(
- &format!(
- "> {}: {}",
- PhpMixed::String(event.get_name().to_string()),
- PhpMixed::String(exec.clone()),
- ),
+ &format!("> {}: {}", event.get_name().to_string(), exec.clone()),
true,
crate::io::NORMAL,
);
} else if self.event_needs_to_output(event) {
self.io.write_error3(
- &format!("> {}", PhpMixed::String(exec.clone())),
+ &format!("> {}", exec.clone()),
true,
crate::io::NORMAL,
);
@@ -741,8 +737,8 @@ impl EventDispatcher {
if exit_code != 0 {
self.io.write_error3(&format!(
"<error>Script {} handling the {} event returned with error code {}</error>",
- PhpMixed::String(callable_str.clone()),
- PhpMixed::String(event.get_name().to_string()),
+ callable_str.clone(),
+ event.get_name().to_string(),
exit_code
), true, crate::io::QUIET);
@@ -843,20 +839,16 @@ impl EventDispatcher {
self.io.write_error3(
&format!(
"> {}: {}::{}",
- PhpMixed::String(event.get_name().to_string()),
- PhpMixed::String(class_name.to_string()),
- PhpMixed::String(method_name.to_string()),
+ event.get_name().to_string(),
+ class_name.to_string(),
+ method_name.to_string(),
),
true,
crate::io::NORMAL,
);
} else if self.event_needs_to_output(event) {
self.io.write_error3(
- &format!(
- "> {}::{}",
- PhpMixed::String(class_name.to_string()),
- PhpMixed::String(method_name.to_string()),
- ),
+ &format!("> {}::{}", class_name.to_string(), method_name.to_string()),
true,
crate::io::NORMAL,
);