diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-14 02:04:29 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-14 02:06:44 +0900 |
| commit | 299bf55547c92cbe8c32db2af0350ddad30b0b69 (patch) | |
| tree | 2fbd2dedc833da709d5bcf8f70bd8d56569376a3 /crates/shirabe-external-packages/src/symfony/console/event/console_command_event.rs | |
| parent | eb98b2d00e0f011b568264edfe67f86e2ac9f1df (diff) | |
| download | php-shirabe-299bf55547c92cbe8c32db2af0350ddad30b0b69.tar.gz php-shirabe-299bf55547c92cbe8c32db2af0350ddad30b0b69.tar.zst php-shirabe-299bf55547c92cbe8c32db2af0350ddad30b0b69.zip | |
refactor(console): remove unused symfony event dispatcher
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/event/console_command_event.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/event/console_command_event.rs | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/event/console_command_event.rs b/crates/shirabe-external-packages/src/symfony/console/event/console_command_event.rs deleted file mode 100644 index b20c84c..0000000 --- a/crates/shirabe-external-packages/src/symfony/console/event/console_command_event.rs +++ /dev/null @@ -1,45 +0,0 @@ -//! ref: composer/vendor/symfony/console/Event/ConsoleCommandEvent.php - -use super::console_event::ConsoleEvent; -use crate::symfony::console::command::command::Command; -use crate::symfony::console::input::input_interface::InputInterface; -use crate::symfony::console::output::output_interface::OutputInterface; - -/// Allows to do things before the command is executed, like skipping the command or -/// executing code before the command is going to be executed. -/// -/// Changing the input arguments will have no effect. -#[derive(Debug)] -pub struct ConsoleCommandEvent { - inner: ConsoleEvent, - command_should_run: bool, -} - -impl ConsoleCommandEvent { - pub const RETURN_CODE_DISABLED: i64 = 113; - - pub fn new( - command: Option<Box<dyn Command>>, - input: Box<dyn InputInterface>, - output: Box<dyn OutputInterface>, - ) -> Self { - Self { - inner: ConsoleEvent::new(command, input, output), - command_should_run: true, - } - } - - pub fn disable_command(&mut self) -> bool { - self.command_should_run = false; - self.command_should_run - } - - pub fn enable_command(&mut self) -> bool { - self.command_should_run = true; - self.command_should_run - } - - pub fn command_should_run(&self) -> bool { - self.command_should_run - } -} |
