Repository navigation
Commit fbc926b
committed
Coding standards: Skip anonymous class methods in the block library function name sniff
The ValidBlockLibraryFunctionName sniff skips methods in classes, interfaces and traits, but anonymous classes use their own token (T_ANON_CLASS), so their methods were checked as if they were global functions.1 parent 79e7cd6 commit fbc926b
2 files changed
Lines changed: 7 additions & 0 deletions
File tree
- test/php/gutenberg-coding-standards/Gutenberg
- Sniffs/NamingConventions
- Tests/fixtures/block-library/src/my-block
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
0 commit comments