Skip to content

Commit

Permalink
Merge branch 'main' into spec-realodix
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Aug 2, 2024
2 parents 2f172ee + f56dbc0 commit 9d8a7be
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"homepage": "https://github.com/realodix/relax",
"require": {
"php": "^7.4 || ^8.0",
"friendsofphp/php-cs-fixer": "^3.47",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.15",
"friendsofphp/php-cs-fixer": "^3.61",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.21",
"symfony/console": "^5.4.41 || ^6.0 || ^7.0"
},
"require-dev": {
Expand Down
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
4 changes: 2 additions & 2 deletions tests/Fixtures/Ruleset/relax-commonbox2_actual.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
use \OtherNamespace\no_leading_import_slash;
use SingleImportPerStatement\{SIPSA, SIPSAA};
use SingleImportPerStatement\SIPSB;use SingleImportPerStatement\SIPSC;
use function DDD;
use function CCC\AA;
use const OtherNamespace\BBB;
use const OtherNamespace\AAAA;
use function DDD;
use function CCC\AA;
/**
* ordered_imports
* blank_line_between_import_groups
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 9d8a7be

Please sign in to comment.