File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ final class Fqsen
38
38
public function __construct ($ fqsen )
39
39
{
40
40
$ matches = array ();
41
- $ result = preg_match ('/^ \\\\([A-Za-z_ \\\\ ]+)(?:[:]{2} \\$?([a-zA-Z_ ]+))?(?: \\( \\))?$/ ' , $ fqsen , $ matches );
41
+ $ result = preg_match ('/^ \\\\([ \\ w_ \\\\ ]+)(?:[:]{2} \\$?([ \\ w_ ]+))?(?: \\( \\))?$/ ' , $ fqsen , $ matches );
42
42
43
43
if ($ result === 0 ) {
44
44
throw new \InvalidArgumentException (
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public function validFqsenProvider()
39
39
['\My\Space ' , 'Space ' ],
40
40
['\My\Space\myFunction() ' , 'myFunction ' ],
41
41
['\My\Space\MY_CONSTANT ' , 'MY_CONSTANT ' ],
42
+ ['\My\Space\MY_CONSTANT2 ' , 'MY_CONSTANT2 ' ],
42
43
['\My\Space\MyClass ' , 'MyClass ' ],
43
44
['\My\Space\MyInterface ' , 'MyInterface ' ],
44
45
['\My\Space\MyTrait ' , 'MyTrait ' ],
You can’t perform that action at this time.
0 commit comments