-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generic/UselessOverridingMethod: bail if not checking a class method
The UselessOverridingMethod is triggered when the T_FUNCTION token is found. This token is used for regular functions and also methods. The sniff should run only for class and trait methods (including abstract and anonymous classes). Those are the only methods that can have a parent. So this commit changes the sniff to bail early when dealing with a regular functions, nested functions, interfaces methods and enum methods.
- Loading branch information
1 parent
f38ea41
commit 7071004
Showing
3 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters