File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,15 @@ public function getTraits(): array
290290 }
291291
292292
293+ /**
294+ * @internal
295+ */
296+ public function getTraitResolutions (): array
297+ {
298+ return $ this ->traits ;
299+ }
300+
301+
293302 /**
294303 * @return static
295304 */
Original file line number Diff line number Diff line change @@ -63,6 +63,15 @@ public function addNamespace(string $name): PhpNamespace
6363 }
6464
6565
66+ /**
67+ * @return PhpNamespace[]
68+ */
69+ public function getNamespaces (): array
70+ {
71+ return $ this ->namespaces ;
72+ }
73+
74+
6675 public function __toString (): string
6776 {
6877 foreach ($ this ->namespaces as $ namespace ) {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Assert::false($class->isFinal());
2020Assert::false ($ class ->isAbstract ());
2121Assert::same ([], $ class ->getExtends ());
2222Assert::same ([], $ class ->getTraits ());
23+ Assert::same ([], $ class ->getTraitResolutions ());
2324
2425$ class
2526 ->setAbstract (true )
@@ -38,6 +39,7 @@ Assert::true($class->isFinal());
3839Assert::true ($ class ->isAbstract ());
3940Assert::same ('ParentClass ' , $ class ->getExtends ());
4041Assert::same (['ObjectTrait ' , 'AnotherTrait ' ], $ class ->getTraits ());
42+ Assert::same (['ObjectTrait ' => [], 'AnotherTrait ' => ['sayHello as protected ' ]], $ class ->getTraitResolutions ());
4143Assert::count (2 , $ class ->getConstants ());
4244Assert::type (Nette \PhpGenerator \Constant::class, $ class ->getConstants ()['ROLE ' ]);
4345
You can’t perform that action at this time.
0 commit comments