Commit 7961d8c
committed
Add failing test for use-order rule when using a trait
The error which is reported:
(
[message] => use found on line 48, but require was declared on line 7. Statements should be ordered `namespace`, `use`, `const`, `require`, then code.
[source] => HM.Layout.Order.WrongOrder
[listener] => HM\Sniffs\Layout\OrderSniff
[severity] => 5
[fixable] =>
)
It should be possible to `use` a trait within a class, without
triggering the warning for a top-level namespace `use` statement.1 parent ce200ea commit 7961d8c
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments