File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
src/Standards/PSR12/Docs/Files Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ <documentation title =" Import Statement" >
2+ <standard >
3+ <![CDATA[
4+ Import use statements must not begin with a leading backslash.
5+ ]]>
6+ </standard >
7+ <code_comparison >
8+ <code title =" Valid: Import statement is fully qualified and doesn't begin with a leading backslash." >
9+ <![CDATA[
10+ <?php
11+
12+ use Vendor\Package\ClassA as A;
13+
14+ class FooBar extends A
15+ {
16+ use \FirstTrait;
17+ use SecondTrait;
18+ }
19+ ]]>
20+ </code >
21+ <code title =" Invalid: Import statement begins with a leading backslash." >
22+ <![CDATA[
23+ <?php
24+
25+ use <em>\</em>Vendor\Package\ClassA as A;
26+
27+ class FooBar extends A
28+ {
29+ use \FirstTrait;
30+ use SecondTrait;
31+ }
32+ ]]>
33+ </code >
34+ </code_comparison >
35+ </documentation >
You can’t perform that action at this time.
0 commit comments