File tree 3 files changed +16
-1
lines changed 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ public function visitClass(Class_ $node) {
12
12
$ struct = $ this ->getStruct ();
13
13
14
14
if ($ node ->extends !== null ) {
15
- $ struct ->setParentClassName (implode ('\\' , $ node ->extends ->parts ));
15
+ if ($ node ->extends ->getType () === 'Name_FullyQualified ' ) {
16
+ $ struct ->setParentClassName ('\\' . implode ('\\' , $ node ->extends ->parts ));
17
+ } else {
18
+ $ struct ->setParentClassName (implode ('\\' , $ node ->extends ->parts ));
19
+ }
16
20
}
17
21
18
22
foreach ($ node ->implements as $ name ) {
Original file line number Diff line number Diff line change
1
+ <?php
2
+ class MyCollection2 extends \phootwork \collection \AbstractCollection implements \phootwork \collection \Collection {
3
+
4
+ }
Original file line number Diff line number Diff line change @@ -74,6 +74,13 @@ public function testMyCollection() {
74
74
$ this ->assertEquals ('phootwork\collection\AbstractCollection ' , $ class ->getParentClassName ());
75
75
$ this ->assertTrue ($ class ->hasInterface ('phootwork\collection\Collection ' ));
76
76
}
77
+
78
+ public function testMyCollection2 () {
79
+ $ class = PhpClass::fromFile (__DIR__ . '/../fixtures/MyCollection2.php ' );
80
+
81
+ $ this ->assertEquals ('\phootwork\collection\AbstractCollection ' , $ class ->getParentClassName ());
82
+ $ this ->assertTrue ($ class ->hasInterface ('\phootwork\collection\Collection ' ));
83
+ }
77
84
78
85
public function testTypeClass () {
79
86
$ class = PhpClass::fromFile (__DIR__ . '/../fixtures/TypeClass.php ' );
You can’t perform that action at this time.
0 commit comments