aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/outdated_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-17 02:53:53 +0900
committernsfisis <nsfisis@gmail.com>2026-05-17 02:53:53 +0900
commita1c7e6908a26e10f6e1f23a51721664b5e2d838d (patch)
treec575c76f1b43359ed74913da4c6a2636643f1ba0 /crates/shirabe/src/command/outdated_command.rs
parent7f606f36fef0c0467c3c0db3d0da33af486dae8a (diff)
downloadphp-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.gz
php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.tar.zst
php-shirabe-a1c7e6908a26e10f6e1f23a51721664b5e2d838d.zip
chore(style): cargo fmt
Diffstat (limited to 'crates/shirabe/src/command/outdated_command.rs')
-rw-r--r--crates/shirabe/src/command/outdated_command.rs31
1 files changed, 23 insertions, 8 deletions
diff --git a/crates/shirabe/src/command/outdated_command.rs b/crates/shirabe/src/command/outdated_command.rs
index f7a8f47..ed927b7 100644
--- a/crates/shirabe/src/command/outdated_command.rs
+++ b/crates/shirabe/src/command/outdated_command.rs
@@ -1,15 +1,15 @@
//! ref: composer/src/Composer/Command/OutdatedCommand.php
+use crate::command::base_command::BaseCommand;
+use crate::command::completion_trait::CompletionTrait;
+use crate::console::input::input_argument::InputArgument;
+use crate::console::input::input_option::InputOption;
use anyhow::Result;
use indexmap::IndexMap;
use shirabe_external_packages::symfony::console::input::array_input::ArrayInput;
use shirabe_external_packages::symfony::console::input::input_interface::InputInterface;
use shirabe_external_packages::symfony::console::output::output_interface::OutputInterface;
use shirabe_php_shim::PhpMixed;
-use crate::command::base_command::BaseCommand;
-use crate::command::completion_trait::CompletionTrait;
-use crate::console::input::input_argument::InputArgument;
-use crate::console::input::input_option::InputOption;
#[derive(Debug)]
pub struct OutdatedCommand {
@@ -54,12 +54,20 @@ impl OutdatedCommand {
);
}
- pub fn execute(&mut self, input: &dyn InputInterface, output: &dyn OutputInterface) -> Result<i64> {
+ pub fn execute(
+ &mut self,
+ input: &dyn InputInterface,
+ output: &dyn OutputInterface,
+ ) -> Result<i64> {
let mut args: IndexMap<String, PhpMixed> = IndexMap::new();
args.insert("command".to_string(), PhpMixed::String("show".to_string()));
args.insert("--latest".to_string(), PhpMixed::Bool(true));
- if input.get_option("no-interaction").as_bool().unwrap_or(false) {
+ if input
+ .get_option("no-interaction")
+ .as_bool()
+ .unwrap_or(false)
+ {
args.insert("--no-interaction".to_string(), PhpMixed::Bool(true));
}
if input.get_option("no-plugins").as_bool().unwrap_or(false) {
@@ -102,8 +110,15 @@ impl OutdatedCommand {
if input.get_option("sort-by-age").as_bool().unwrap_or(false) {
args.insert("--sort-by-age".to_string(), PhpMixed::Bool(true));
}
- args.insert("--ignore-platform-req".to_string(), input.get_option("ignore-platform-req"));
- if input.get_option("ignore-platform-reqs").as_bool().unwrap_or(false) {
+ args.insert(
+ "--ignore-platform-req".to_string(),
+ input.get_option("ignore-platform-req"),
+ );
+ if input
+ .get_option("ignore-platform-reqs")
+ .as_bool()
+ .unwrap_or(false)
+ {
args.insert("--ignore-platform-reqs".to_string(), PhpMixed::Bool(true));
}
args.insert("--format".to_string(), input.get_option("format"));