Skip to content

Commit 977da00

Browse files
authored
Merge pull request #6 from Stevemoretz/patch-2
Check namespace + class to see if it exists
2 parents 7e5538a + 7f729dc commit 977da00

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Barryvdh/Reflection/DocBlock/Type/Collection.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ protected function expand($type)
210210
if ('' !== $namespace) {
211211
$namespace .= self::OPERATOR_NAMESPACE;
212212
}
213-
return self::OPERATOR_NAMESPACE . $namespace . $type;
213+
$with_name_space = self::OPERATOR_NAMESPACE . $namespace . $type;
214+
if($this->shouldBeAbsolute($with_name_space)){
215+
return $with_name_space;
216+
}
217+
return $type;
214218
}
215219

216220
if (strpos($type_parts[0], '::')) {

0 commit comments

Comments
 (0)