Skip to content

Commit ba1d99d

Browse files
committed
Fix missing types
1 parent 054bc67 commit ba1d99d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/TextUI/Configuration/SourceFilter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

src/Util/FileMatcher.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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 .= '(/|$)';

0 commit comments

Comments
 (0)