//! ref: composer/src/Composer/IO/NullIO.php use crate::io::base_io::BaseIO; use crate::io::io_interface::IOInterface; use shirabe_php_shim::PhpMixed; #[derive(Debug)] pub struct NullIO { authentications: index::IndexMap>>, } impl IOInterface for NullIO { fn is_interactive(&self) -> bool { false } fn is_verbose(&self) -> bool { false } fn is_very_verbose(&self) -> bool { false } fn is_debug(&self) -> bool { false } fn is_decorated(&self) -> bool { false } fn write(&self, _messages: PhpMixed, _newline: bool, _verbosity: i64) {} fn write_error(&self, _messages: PhpMixed, _newline: bool, _verbosity: i64) {} fn overwrite(&self, _messages: PhpMixed, _newline: bool, _size: Option, _verbosity: i64) {} fn overwrite_error( &self, _messages: PhpMixed, _newline: bool, _size: Option, _verbosity: i64, ) { } fn ask(&self, _question: String, default: PhpMixed) -> PhpMixed { default } fn ask_confirmation(&self, _question: String, default: bool) -> bool { default } fn ask_and_validate( &self, _question: String, _validator: Box PhpMixed>, _attempts: Option, default: PhpMixed, ) -> PhpMixed { default } fn ask_and_hide_answer(&self, _question: String) -> Option { None } fn select( &self, _question: String, _choices: Vec, default: PhpMixed, _attempts: PhpMixed, _error_message: String, _multiselect: bool, ) -> PhpMixed { default } } impl BaseIO for NullIO { fn authentications( &self, ) -> &indexmap::IndexMap>> { &self.authentications } fn authentications_mut( &mut self, ) -> &mut indexmap::IndexMap>> { &mut self.authentications } }