Commit 73f7080
committed
Classes/RestrictedExtendClasses: efficiency fix
The `AbstractClassRestrictionsSniff` class does quite a lot of processing before passing off to the `process_matched_token()` method, which can cause quite some overhead for a sniff like this, which is only interested in a class being extended, so let's make it so this sniff only listens to the `T_EXTENDS` token.
This should make the sniff significantly faster.1 parent dfe6a2c commit 73f7080
File tree
1 file changed
+14
-7
lines changed- WordPressVIPMinimum/Sniffs/Classes
1 file changed
+14
-7
lines changedLines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
38 | 52 | | |
39 | 53 | | |
40 | 54 | | |
| |||
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
| |||
0 commit comments