Skip to content

Commit

Permalink
relax: ordered_imports['imports_order'] mengacu pada PER CS 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Aug 2, 2024
1 parent 1fbffdb commit 2e4c34d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/RuleSet/Sets/Relax.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function mainRules(): array
'curly_brace_block', 'parenthesis_brace_block', 'square_brace_block',
],
],
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'function', 'const']],
'single_import_per_statement' => ['group_to_single_imports' => false],
'space_after_semicolon' => ['remove_in_empty_for_expressions' => true],
// TODO: Add 'match' & 'parameters' when PHP 8.0+ is required
Expand Down
6 changes: 3 additions & 3 deletions tests/Fixtures/Ruleset/relax-commonbox2_expected.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

namespace Realodix\Relax; // no_leading_namespace_whitespace

use const OtherNamespace\AAAA;
use const OtherNamespace\BBB;

use OtherNamespace\AAC;
use OtherNamespace\Acme;
use OtherNamespace\Bar;
Expand All @@ -25,6 +22,9 @@
use function CCC\AA;
use function DDD;

use const OtherNamespace\AAAA;
use const OtherNamespace\BBB;

/**
* ordered_imports
* blank_line_between_import_groups
Expand Down

0 comments on commit 2e4c34d

Please sign in to comment.