File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11# ReflectionCommon
2+ [ ![ Build Status] ( https://travis-ci.org/phpDocumentor/ReflectionCommon.svg?branch=master )] ( https://travis-ci.org/phpDocumentor/ReflectionCommon )
Original file line number Diff line number Diff line change @@ -38,7 +38,11 @@ final class Fqsen
3838 public function __construct ($ fqsen )
3939 {
4040 $ matches = array ();
41- $ result = preg_match ('/^ \\\\([ \\w_ \\\\]*)(?:[:]{2} \\$?([ \\w_]+))?(?: \\( \\))?$/ ' , $ fqsen , $ matches );
41+ $ result = preg_match (
42+ '/^ \\\\([a-zA-Z_ \\x7f- \\xff][a-zA-Z0-9_ \\x7f- \\xff \\\\]*)?(?:[:]{2} \\$?([a-zA-Z_ \\x7f- \\xff][a-zA-Z0-9_ \\x7f- \\xff]*))?(?: \\( \\))?$/ ' ,
43+ $ fqsen ,
44+ $ matches
45+ );
4246
4347 if ($ result === 0 ) {
4448 throw new \InvalidArgumentException (
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ public function validFqsenProvider()
4343 ['\My\Space\MY_CONSTANT2 ' , 'MY_CONSTANT2 ' ],
4444 ['\My\Space\MyClass ' , 'MyClass ' ],
4545 ['\My\Space\MyInterface ' , 'MyInterface ' ],
46+ ['\My\Space\Option«T» ' , 'Option«T» ' ],
4647 ['\My\Space\MyTrait ' , 'MyTrait ' ],
4748 ['\My\Space\MyClass::myMethod() ' , 'myMethod ' ],
4849 ['\My\Space\MyClass::$my_property ' , 'my_property ' ],
@@ -72,6 +73,7 @@ public function invalidFqsenProvider()
7273 ['\My\* ' ],
7374 ['\My\Space\.() ' ],
7475 ['My\Space ' ],
76+ ['1_function() ' ]
7577 ];
7678 }
7779
You can’t perform that action at this time.
0 commit comments