Skip to content

Commit 0da1a14

Browse files
committed
Improves #3 Support class names containing "_"
1 parent 5d5c72b commit 0da1a14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpDocReader/PhpDocReader.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function getPropertyClass(ReflectionProperty $property)
7575
}
7676

7777
// Ignore types containing special characters ([], <> ...)
78-
if (! preg_match('/^[a-zA-Z0-9\\\\]+$/', $type)) {
78+
if (! preg_match('/^[a-zA-Z0-9\\\\_]+$/', $type)) {
7979
return null;
8080
}
8181

@@ -183,7 +183,7 @@ public function getParameterClass(ReflectionParameter $parameter)
183183
}
184184

185185
// Ignore types containing special characters ([], <> ...)
186-
if (! preg_match('/^[a-zA-Z0-9\\\\]+$/', $type)) {
186+
if (! preg_match('/^[a-zA-Z0-9\\\\_]+$/', $type)) {
187187
return null;
188188
}
189189

0 commit comments

Comments
 (0)