Skip to content

Commit

Permalink
relaxplus: Improve ordered_class_elements
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Aug 2, 2024
1 parent f56dbc0 commit 78f1b75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/RuleSet/Sets/RelaxPlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public function mainRules(): array
'no_superfluous_elseif' => true,
'ordered_class_elements' => [
'order' => [
'use_trait', 'case', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'destruct', 'magic', 'phpunit',
'use_trait', 'case', 'constant', 'property',
'construct', 'destruct', 'magic',
],
],

Expand Down
16 changes: 8 additions & 8 deletions tests/Fixtures/Ruleset/relaxplus_expected.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@ final class OrderedClassElements

const C2 = 2;

protected static $protStatProp;

public static $pubStatProp1;

public $pubProp1;

public $pubProp2;

public static $pubStatProp2;

public $pubProp3;

protected static $protStatProp;

protected $protProp;

public $pubProp2;

private static $privStatProp;

private $privProp;

public static $pubStatProp2;

public $pubProp3;

protected function __construct() {}

public function __destruct() {}
Expand Down

0 comments on commit 78f1b75

Please sign in to comment.