diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 02:53:53 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 02:53:53 +0900 |
| commit | a1c7e6908a26e10f6e1f23a51721664b5e2d838d (patch) | |
| tree | c575c76f1b43359ed74913da4c6a2636643f1ba0 /crates/shirabe/src/io/buffer_io.rs | |
| parent | 7f606f36fef0c0467c3c0db3d0da33af486dae8a (diff) | |
| download | php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.gz php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.zst php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.zip | |
chore(style): cargo fmt
Diffstat (limited to 'crates/shirabe/src/io/buffer_io.rs')
| -rw-r--r-- | crates/shirabe/src/io/buffer_io.rs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/crates/shirabe/src/io/buffer_io.rs b/crates/shirabe/src/io/buffer_io.rs index 30e2aeb..aa1d970 100644 --- a/crates/shirabe/src/io/buffer_io.rs +++ b/crates/shirabe/src/io/buffer_io.rs @@ -1,5 +1,6 @@ //! ref: composer/src/Composer/IO/BufferIO.php +use crate::io::console_io::ConsoleIO; use anyhow::Result; use shirabe_external_packages::composer::pcre::preg::Preg; use shirabe_external_packages::symfony::console::formatter::output_formatter_interface::OutputFormatterInterface; @@ -8,8 +9,10 @@ use shirabe_external_packages::symfony::console::helper::question_helper::Questi use shirabe_external_packages::symfony::console::input::streamable_input_interface::StreamableInputInterface; use shirabe_external_packages::symfony::console::input::string_input::StringInput; use shirabe_external_packages::symfony::console::output::stream_output::StreamOutput; -use shirabe_php_shim::{fopen, fseek, fwrite, rewind, stream_get_contents, strip_tags, PhpMixed, RuntimeException, PHP_EOL}; -use crate::io::console_io::ConsoleIO; +use shirabe_php_shim::{ + PHP_EOL, PhpMixed, RuntimeException, fopen, fseek, fwrite, rewind, stream_get_contents, + strip_tags, +}; #[derive(Debug)] pub struct BufferIO { @@ -17,7 +20,11 @@ pub struct BufferIO { } impl BufferIO { - pub fn new(input: String, verbosity: i64, formatter: Option<Box<dyn OutputFormatterInterface>>) -> Result<Self> { + pub fn new( + input: String, + verbosity: i64, + formatter: Option<Box<dyn OutputFormatterInterface>>, + ) -> Result<Self> { let mut input_obj = StringInput::new(input); input_obj.set_interactive(false); @@ -66,7 +73,13 @@ impl BufferIO { } pub fn set_user_inputs(&mut self, inputs: Vec<String>) -> Result<()> { - if self.inner.input.as_any().downcast_ref::<dyn StreamableInputInterface>().is_none() { + if self + .inner + .input + .as_any() + .downcast_ref::<dyn StreamableInputInterface>() + .is_none() + { return Err(RuntimeException { message: "Setting the user inputs requires at least the version 3.2 of the symfony/console component.".to_string(), code: 0, |
