Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Configuration/Defaults/CommonRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,20 @@ class CommonRules extends Rules
"constant_public",
"constant_protected",
"constant_private",
"property_public_static",
"property_protected_static",
"property_private_static",
"property_public",
"property_protected",
"property_private",
"construct",
"destruct",
"magic",
"phpunit",
"property_public_static",
"method_public_static",
"method_public",
"property_protected_static",
"method_protected_static",
"method_protected",
"property_private_static",
"method_private_static",
"method_private",
],
Expand Down
10 changes: 8 additions & 2 deletions tests/fixtures/orderedClassElements/actual.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<?php

class Example {
private static $staticVar = "Error";
protected static $staticClass = Error::class;
public static $staticLaravel = "LaravelPaths";
private string $var = "Error";
protected string $class = Error::class;
public string $laravel = "LaravelPaths";
public const PublicLaravel = "PublicLaravel";
protected const ProtectedLaravel = "ProtectedLaravel";
private const PrivateLaravel = "PrivateLaravel";

public function test(): void
public function test321(): void
{
}

public static function testStatic(): void
public static function testStatic123(): void
{
}

Expand Down
11 changes: 9 additions & 2 deletions tests/fixtures/orderedClassElements/expected.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@ class Example
{
use Castable;

public const PublicLaravel = "PublicLaravel";
protected const ProtectedLaravel = "ProtectedLaravel";
private const PrivateLaravel = "PrivateLaravel";

public static $staticLaravel = "LaravelPaths";
protected static $staticClass = Error::class;
private static $staticVar = "Error";
public string $laravel = "LaravelPaths";
protected string $class = Error::class;
private string $var = "Error";

public static function testStatic(): void
public static function testStatic123(): void
{
}

public function test(): void
public function test321(): void
{
}

Expand Down
Loading