Skip to content

Commit

Permalink
Add group for __invoke method
Browse files Browse the repository at this point in the history
  • Loading branch information
freerich authored May 27, 2024
1 parent c72b104 commit 04f28a4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class ClassStructureSniff implements Sniff
private const GROUP_CONSTRUCTOR = 'constructor';
private const GROUP_STATIC_CONSTRUCTORS = 'static constructors';
private const GROUP_DESTRUCTOR = 'destructor';
private const GROUP_INVOKE_METHOD = 'invoke method';
private const GROUP_MAGIC_METHODS = 'magic methods';
private const GROUP_PUBLIC_METHODS = 'public methods';
private const GROUP_PUBLIC_ABSTRACT_METHODS = 'public abstract methods';
Expand Down Expand Up @@ -153,6 +154,7 @@ class ClassStructureSniff implements Sniff
self::GROUP_SHORTCUT_STATIC_METHODS,
self::GROUP_CONSTRUCTOR,
self::GROUP_DESTRUCTOR,
self::GROUP_INVOKE_METHOD,
self::GROUP_PUBLIC_METHODS,
self::GROUP_PROTECTED_METHODS,
self::GROUP_PRIVATE_METHODS,
Expand All @@ -174,7 +176,7 @@ class ClassStructureSniff implements Sniff
'__serialize' => self::GROUP_MAGIC_METHODS,
'__unserialize' => self::GROUP_MAGIC_METHODS,
'__tostring' => self::GROUP_MAGIC_METHODS,
'__invoke' => self::GROUP_MAGIC_METHODS,
'__invoke' => self::GROUP_INVOKE_METHOD,
'__set_state' => self::GROUP_MAGIC_METHODS,
'__clone' => self::GROUP_MAGIC_METHODS,
'__debuginfo' => self::GROUP_MAGIC_METHODS,
Expand Down Expand Up @@ -576,6 +578,7 @@ private function getNormalizedGroups(): array
self::GROUP_CONSTRUCTOR,
self::GROUP_STATIC_CONSTRUCTORS,
self::GROUP_DESTRUCTOR,
self::GROUP_INVOKE_METHOD,
self::GROUP_PUBLIC_METHODS,
self::GROUP_PUBLIC_STATIC_METHODS,
self::GROUP_PROTECTED_METHODS,
Expand Down

0 comments on commit 04f28a4

Please sign in to comment.