File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ namespace Vendor\Package;
213213use Vendor\Package\{ClassA as A, ClassB, ClassC as C};
214214use Vendor\Package\SomeNamespace\ClassD as D;
215215use Vendor\Package\AnotherNamespace\ClassE as E;
216+ use SomeVendor\Pack\ANamespace\SubNamespace\ClassF;
216217
217218use function Vendor\Package\{functionA, functionB, functionC};
218219use function Another\Vendor\functionD;
@@ -229,8 +230,8 @@ class FooBar
229230}
230231```
231232
232- Compound namespaces with a depth of more than two MUST NOT be used. Therefore, the
233- following is the maximum compounding depth allowed:
233+ When using compound namespaces, there MUST NOT be more than two sub-namespaces within the group.
234+ That is, the following is allowed:
234235
235236``` php
236237<?php
@@ -249,6 +250,7 @@ And the following would not be allowed:
249250<?php
250251
251252use Vendor\Package\SomeNamespace\{
253+ // This has too many namespace segments to be in a group.
252254 SubnamespaceOne\AnotherNamespace\ClassA,
253255 SubnamespaceOne\ClassB,
254256 ClassZ,
You can’t perform that action at this time.
0 commit comments