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
3939 {
4040 if (self ::$ instance === null ) {
4141 $ source = Registry::get ()->source ();
42+ self ::$ instance = new self ($ source );
4243
43- return new self ( $ source ) ;
44+ return self :: $ instance ;
4445 }
4546
4647 return self ::$ instance ;
Original file line number Diff line number Diff line change @@ -90,11 +90,9 @@ private static function mapToRegex(array $tokens): FileMatcherRegex
9090 self ::T_BRACKET_OPEN => '[ ' ,
9191 self ::T_BRACKET_CLOSE => '] ' ,
9292 self ::T_HYPHEN => '- ' ,
93+ self ::T_COLON => ': ' ,
94+ self ::T_BACKSLASH => '\\' ,
9395 self ::T_CHAR_CLASS => '[: ' . $ token [1 ] . ':] ' ,
94- default => throw new RuntimeException (sprintf (
95- 'Unhandled token type: %s - this should not happen ' ,
96- $ type ,
97- )),
9896 };
9997 }
10098 $ regex .= '(/|$) ' ;
You can’t perform that action at this time.
0 commit comments