File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,9 @@ public static function instance(): self
39
39
{
40
40
if (self ::$ instance === null ) {
41
41
$ source = Registry::get ()->source ();
42
+ self ::$ instance = new self ($ source );
42
43
43
- return new self ( $ source ) ;
44
+ return self :: $ instance ;
44
45
}
45
46
46
47
return self ::$ instance ;
Original file line number Diff line number Diff line change @@ -90,11 +90,9 @@ private static function mapToRegex(array $tokens): FileMatcherRegex
90
90
self ::T_BRACKET_OPEN => '[ ' ,
91
91
self ::T_BRACKET_CLOSE => '] ' ,
92
92
self ::T_HYPHEN => '- ' ,
93
+ self ::T_COLON => ': ' ,
94
+ self ::T_BACKSLASH => '\\' ,
93
95
self ::T_CHAR_CLASS => '[: ' . $ token [1 ] . ':] ' ,
94
- default => throw new RuntimeException (sprintf (
95
- 'Unhandled token type: %s - this should not happen ' ,
96
- $ type ,
97
- )),
98
96
};
99
97
}
100
98
$ regex .= '(/|$) ' ;
You can’t perform that action at this time.
0 commit comments