Skip to content

Commit fe2b125

Browse files
committed
Bug fixes
1 parent bc46cee commit fe2b125

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/FileProcessor.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ protected function processStatements(array $statements, $prefix = '')
7070

7171
if ($statement instanceof Use_) {
7272
foreach ($statement->uses as $use) {
73-
$uses[$use->alias] = (string)$use->name;
73+
$name = (string)$use->name;
74+
if (is_null($use->alias)) {
75+
$uses[$name] = $name;
76+
} else {
77+
$uses[(string) $use->alias] = $name;
78+
}
7479
}
7580
}
7681

@@ -151,7 +156,7 @@ protected function processStatements(array $statements, $prefix = '')
151156
}
152157
}
153158

154-
$thisMethod['params']['$'.$param->name] = $paramType;
159+
$thisMethod['params']['$'.$param->var->name] = $paramType;
155160
}
156161

157162
$this->methods[$fullMethodName] = $thisMethod;

0 commit comments

Comments
 (0)