aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installer
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-28 17:45:06 +0900
committernsfisis <nsfisis@gmail.com>2026-06-28 17:45:26 +0900
commit53f1fb395f33e0fb8db9aebd09ea9082f650f9f1 (patch)
treef9e8bf0e9d4b1e98cce383574fb6a13b684fff08 /crates/shirabe/src/installer
parent212f5cd75b1403ee75ffa44d7ebdb181174340c0 (diff)
downloadphp-shirabe-53f1fb395f33e0fb8db9aebd09ea9082f650f9f1.tar.gz
php-shirabe-53f1fb395f33e0fb8db9aebd09ea9082f650f9f1.tar.zst
php-shirabe-53f1fb395f33e0fb8db9aebd09ea9082f650f9f1.zip
refactor: add linter
Diffstat (limited to 'crates/shirabe/src/installer')
-rw-r--r--crates/shirabe/src/installer/binary_installer.rs15
-rw-r--r--crates/shirabe/src/installer/installation_manager.rs17
-rw-r--r--crates/shirabe/src/installer/installer_event.rs5
-rw-r--r--crates/shirabe/src/installer/library_installer.rs13
4 files changed, 23 insertions, 27 deletions
diff --git a/crates/shirabe/src/installer/binary_installer.rs b/crates/shirabe/src/installer/binary_installer.rs
index ea73f6f..31e2e7b 100644
--- a/crates/shirabe/src/installer/binary_installer.rs
+++ b/crates/shirabe/src/installer/binary_installer.rs
@@ -1,6 +1,13 @@
//! ref: composer/src/Composer/Installer/BinaryInstaller.php
+use crate::io::IOInterface;
+use crate::io::IOInterfaceImmutable;
use crate::io::io_interface;
+use crate::package::PackageInterfaceHandle;
+use crate::util::Filesystem;
+use crate::util::Platform;
+use crate::util::ProcessExecutor;
+use crate::util::Silencer;
use indexmap::IndexMap;
use shirabe_external_packages::composer::pcre::{CaptureKey, Preg};
use shirabe_php_shim::{
@@ -9,14 +16,6 @@ use shirabe_php_shim::{
substr, trim, umask,
};
-use crate::io::IOInterface;
-use crate::io::IOInterfaceImmutable;
-use crate::package::PackageInterfaceHandle;
-use crate::util::Filesystem;
-use crate::util::Platform;
-use crate::util::ProcessExecutor;
-use crate::util::Silencer;
-
/// Seam over the BinaryInstaller methods reached through LibraryInstaller, so tests can inject a
/// recording double. Composer has no PHP `BinaryInstallerInterface`; this exists only to allow the
/// `LibraryInstaller` collaborator to be mocked the way PHPUnit mocks the concrete class.
diff --git a/crates/shirabe/src/installer/installation_manager.rs b/crates/shirabe/src/installer/installation_manager.rs
index bee14cc..3ce8076 100644
--- a/crates/shirabe/src/installer/installation_manager.rs
+++ b/crates/shirabe/src/installer/installation_manager.rs
@@ -1,14 +1,5 @@
//! ref: composer/src/Composer/Installer/InstallationManager.php
-use crate::io::io_interface;
-use anyhow::Result;
-use indexmap::IndexMap;
-use shirabe_external_packages::seld::signal::SignalHandler;
-use shirabe_php_shim::{
- InvalidArgumentException, PhpMixed, array_splice, array_unshift, http_build_query, json_encode,
- str_contains, str_replace, strpos, strtolower,
-};
-
use crate::dependency_resolver::operation::InstallOperation;
use crate::dependency_resolver::operation::MarkAliasInstalledOperation;
use crate::dependency_resolver::operation::MarkAliasUninstalledOperation;
@@ -21,10 +12,18 @@ use crate::installer::InstallerInterface;
use crate::installer::PackageEvents;
use crate::io::IOInterface;
use crate::io::IOInterfaceImmutable;
+use crate::io::io_interface;
use crate::package::PackageInterfaceHandle;
use crate::repository::InstalledRepositoryInterface;
use crate::util::Platform;
use crate::util::r#loop::Loop;
+use anyhow::Result;
+use indexmap::IndexMap;
+use shirabe_external_packages::seld::signal::SignalHandler;
+use shirabe_php_shim::{
+ InvalidArgumentException, PhpMixed, array_splice, array_unshift, http_build_query, json_encode,
+ str_contains, str_replace, strpos, strtolower,
+};
/// Package operation manager.
#[derive(Debug)]
diff --git a/crates/shirabe/src/installer/installer_event.rs b/crates/shirabe/src/installer/installer_event.rs
index ca0be22..5171b6d 100644
--- a/crates/shirabe/src/installer/installer_event.rs
+++ b/crates/shirabe/src/installer/installer_event.rs
@@ -1,13 +1,12 @@
//! ref: composer/src/Composer/Installer/InstallerEvent.php
-use indexmap::IndexMap;
-use shirabe_php_shim::PhpMixed;
-
use crate::composer::ComposerWeakHandle;
use crate::dependency_resolver::Transaction;
use crate::event_dispatcher::Event;
use crate::event_dispatcher::EventInterface;
use crate::io::IOInterface;
+use indexmap::IndexMap;
+use shirabe_php_shim::PhpMixed;
#[derive(Debug)]
pub struct InstallerEvent {
diff --git a/crates/shirabe/src/installer/library_installer.rs b/crates/shirabe/src/installer/library_installer.rs
index 26fbf0e..133ba7c 100644
--- a/crates/shirabe/src/installer/library_installer.rs
+++ b/crates/shirabe/src/installer/library_installer.rs
@@ -1,12 +1,5 @@
//! ref: composer/src/Composer/Installer/LibraryInstaller.php
-use anyhow::Result;
-use shirabe_external_packages::composer::pcre::Preg;
-use shirabe_php_shim::{
- InvalidArgumentException, LogicException, PhpMixed, dirname, is_dir, is_link, preg_quote,
- realpath, rmdir, rtrim, strpos,
-};
-
use crate::composer::PartialComposerWeakHandle;
use crate::downloader::DownloadManagerInterface;
use crate::installer::BinaryInstaller;
@@ -19,6 +12,12 @@ use crate::repository::InstalledRepositoryInterface;
use crate::util::Filesystem;
use crate::util::Platform;
use crate::util::Silencer;
+use anyhow::Result;
+use shirabe_external_packages::composer::pcre::Preg;
+use shirabe_php_shim::{
+ InvalidArgumentException, LogicException, PhpMixed, dirname, is_dir, is_link, preg_quote,
+ realpath, rmdir, rtrim, strpos,
+};
/// Package installation manager.
#[derive(Debug)]