From 659a8001364f853271d01f092a8adb989fff4294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 17 Oct 2022 15:53:58 +0200 Subject: [PATCH 1/2] Order imports alphabetically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- src/Config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Config.php b/src/Config.php index ed9d0ef..c3ee446 100644 --- a/src/Config.php +++ b/src/Config.php @@ -46,6 +46,7 @@ public function getRules() : array { 'no_trailing_whitespace' => true, 'no_trailing_whitespace_in_comment' => true, 'no_unused_imports' => true, + 'ordered_imports' => true, 'single_blank_line_at_eof' => true, 'single_class_element_per_statement' => true, 'single_import_per_statement' => true, From 57f50fcbaafaf94139399470dbba3ae8d8303e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <91878298+come-nc@users.noreply.github.com> Date: Mon, 17 Oct 2022 16:04:17 +0200 Subject: [PATCH 2/2] Update src/Config.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> --- src/Config.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Config.php b/src/Config.php index c3ee446..fb37bf2 100644 --- a/src/Config.php +++ b/src/Config.php @@ -46,7 +46,10 @@ public function getRules() : array { 'no_trailing_whitespace' => true, 'no_trailing_whitespace_in_comment' => true, 'no_unused_imports' => true, - 'ordered_imports' => true, + 'ordered_imports' => [ + 'imports_order' => ['class', 'function', 'const'], + 'sort_algorithm' => 'alpha' + ], 'single_blank_line_at_eof' => true, 'single_class_element_per_statement' => true, 'single_import_per_statement' => true,