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 1
1
# 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
38
38
public function __construct ($ fqsen )
39
39
{
40
40
$ 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
+ );
42
46
43
47
if ($ result === 0 ) {
44
48
throw new \InvalidArgumentException (
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ public function validFqsenProvider()
43
43
['\My\Space\MY_CONSTANT2 ' , 'MY_CONSTANT2 ' ],
44
44
['\My\Space\MyClass ' , 'MyClass ' ],
45
45
['\My\Space\MyInterface ' , 'MyInterface ' ],
46
+ ['\My\Space\Option«T» ' , 'Option«T» ' ],
46
47
['\My\Space\MyTrait ' , 'MyTrait ' ],
47
48
['\My\Space\MyClass::myMethod() ' , 'myMethod ' ],
48
49
['\My\Space\MyClass::$my_property ' , 'my_property ' ],
@@ -72,6 +73,7 @@ public function invalidFqsenProvider()
72
73
['\My\* ' ],
73
74
['\My\Space\.() ' ],
74
75
['My\Space ' ],
76
+ ['1_function() ' ]
75
77
];
76
78
}
77
79
You can’t perform that action at this time.
0 commit comments