diff options
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony')
4 files changed, 72 insertions, 106 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/component/console/command/command.rs b/crates/shirabe-external-packages/src/symfony/component/console/command/command.rs index c09940e..32965cf 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/command/command.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/command/command.rs @@ -1,119 +1,18 @@ -use crate::symfony::component::console::completion::completion_input::CompletionInput; -use crate::symfony::component::console::completion::completion_suggestions::CompletionSuggestions; -use crate::symfony::component::console::input::input_definition::InputDefinition; -use crate::symfony::component::console::input::input_interface::InputInterface; -use crate::symfony::component::console::output::output_interface::OutputInterface; -use shirabe_php_shim::PhpMixed; - +/// Stub for \Symfony\Component\Console\Command\Command. pub trait Command { - fn get_name(&self) -> String { - todo!() - } - fn set_name(&mut self, _name: &str) { - todo!() - } - fn get_description(&self) -> String { - todo!() - } - fn set_description(&mut self, _description: &str) { - todo!() - } - fn get_definition(&self) -> &InputDefinition { - todo!() - } - fn complete(&self, _input: &CompletionInput, _suggestions: &mut CompletionSuggestions) { - todo!() - } -} - -#[derive(Debug)] -pub struct CommandBase; - -impl Command for CommandBase {} - -impl CommandBase { - pub fn new(_name: Option<&str>) -> Self { - todo!() - } - - pub fn set_name(&mut self, _name: &str) -> &mut Self { - todo!() - } - - pub fn get_name(&self) -> Option<String> { - todo!() - } - - pub fn set_description(&mut self, _description: &str) -> &mut Self { - todo!() - } - - pub fn get_description(&self) -> String { - todo!() - } - - pub fn set_help(&mut self, _help: &str) -> &mut Self { - todo!() - } - - pub fn set_definition(&mut self, _definition: PhpMixed) -> &mut Self { - todo!() - } - - pub fn get_definition(&self) -> &InputDefinition { - todo!() - } - - pub fn add_argument( - &mut self, - _name: &str, - _mode: Option<i64>, - _description: &str, - _default: PhpMixed, - ) -> &mut Self { - todo!() - } - - pub fn add_option( - &mut self, - _name: &str, - _shortcut: Option<&str>, - _mode: Option<i64>, - _description: &str, - _default: PhpMixed, - ) -> &mut Self { + fn get_name(&self) -> Option<String> { todo!() } - pub fn set_aliases(&mut self, _aliases: &[String]) -> &mut Self { - todo!() - } - - pub fn get_aliases(&self) -> Vec<String> { - todo!() - } - - pub fn set_hidden(&mut self, _hidden: bool) -> &mut Self { - todo!() - } - - pub fn is_hidden(&self) -> bool { - todo!() - } - - pub fn run( - &mut self, - _input: &mut dyn InputInterface, - _output: &mut dyn OutputInterface, - ) -> anyhow::Result<i64> { + fn set_name(&mut self, _name: &str) { todo!() } - pub fn get_helper(&self, _name: &str) -> PhpMixed { + fn get_description(&self) -> String { todo!() } - pub fn get_helper_set(&self) -> PhpMixed { + fn set_description(&mut self, _description: &str) { todo!() } } diff --git a/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs b/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs index ba01e07..0f7f336 100644 --- a/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs +++ b/crates/shirabe-external-packages/src/symfony/component/console/helper/table.rs @@ -29,7 +29,19 @@ impl Table { todo!() } + pub fn set_column_width(&mut self, _column_index: usize, _width: i64) -> &mut Self { + todo!() + } + pub fn set_column_widths(&mut self, _widths: Vec<i64>) -> &mut Self { todo!() } + + pub fn set_column_max_width(&mut self, _column_index: usize, _width: i64) -> &mut Self { + todo!() + } + + pub fn set_horizontal(&mut self, _horizontal: bool) -> &mut Self { + todo!() + } } diff --git a/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs b/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs index ae95aeb..8437ba6 100644 --- a/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs +++ b/crates/shirabe-external-packages/src/symfony/component/finder/finder.rs @@ -62,8 +62,59 @@ impl Finder { todo!() } + pub fn sort_by_accessed_time(&mut self) -> &mut Self { + todo!() + } + + pub fn date(&mut self, _date: &str) -> &mut Self { + todo!() + } + + pub fn get_iterator(&self) -> FinderIterator { + todo!() + } + pub fn iter(&self) -> impl Iterator<Item = SplFileInfo> { todo!(); std::iter::empty() } } + +#[derive(Debug)] +pub struct FinderIterator; + +impl FinderIterator { + pub fn valid(&self) -> bool { + todo!() + } + + pub fn current(&self) -> SplFileInfo { + todo!() + } +} + +impl Iterator for FinderIterator { + type Item = SplFileInfo; + + fn next(&mut self) -> Option<SplFileInfo> { + todo!() + } +} + +impl IntoIterator for Finder { + type Item = SplFileInfo; + type IntoIter = std::vec::IntoIter<SplFileInfo>; + + fn into_iter(self) -> Self::IntoIter { + todo!() + } +} + +impl IntoIterator for &mut Finder { + type Item = SplFileInfo; + type IntoIter = std::vec::IntoIter<SplFileInfo>; + + fn into_iter(self) -> Self::IntoIter { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/console/question/question.rs b/crates/shirabe-external-packages/src/symfony/console/question/question.rs index 4cc4d6d..02402ce 100644 --- a/crates/shirabe-external-packages/src/symfony/console/question/question.rs +++ b/crates/shirabe-external-packages/src/symfony/console/question/question.rs @@ -15,6 +15,10 @@ impl Question { todo!() } + pub fn set_normalizer(&mut self, _normalizer: Box<dyn Fn(&PhpMixed) -> PhpMixed>) { + todo!() + } + pub fn set_max_attempts(&mut self, _attempts: Option<i64>) { todo!() } |
