We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8e9d21 commit cc33addCopy full SHA for cc33add
packages/reflection/src/PropertyReflector.php
@@ -98,13 +98,15 @@ public function getIterableType(): ?TypeReflector
98
return null;
99
}
100
101
- preg_match('/@var ([\\\\\w]+)\[]/', $doc, $match);
+ if (preg_match('/@var\s+([\\\\\w]+)\[\]/', $doc, $match)) {
102
+ return new TypeReflector(ltrim($match[1], '\\'));
103
+ }
104
- if (! isset($match[1])) {
- return null;
105
+ if (preg_match('/@var\s+(?:list|array)<([\\\\\w]+)>/', $doc, $match)) {
106
107
108
- return new TypeReflector(ltrim($match[1], '\\'));
109
+ return null;
110
111
112
public function isUninitialized(object $object): bool
0 commit comments