Skip to content

Commit 7f729dc

Browse files
authored
Check namespace + class to see if it exists
main issue : barryvdh/laravel-ide-helper#1273 Adds support for psaml and php-stan specific params and other possible problems.
1 parent 144140c commit 7f729dc

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
@@ -176,7 +176,11 @@ protected function expand($type)
176176
if ('' !== $namespace) {
177177
$namespace .= self::OPERATOR_NAMESPACE;
178178
}
179-
return self::OPERATOR_NAMESPACE . $namespace . $type;
179+
$with_name_space = self::OPERATOR_NAMESPACE . $namespace . $type;
180+
if($this->shouldBeAbsolute($with_name_space)){
181+
return $with_name_space;
182+
}
183+
return $type;
180184
}
181185

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

0 commit comments

Comments
 (0)