Skip to content

Commit dd01f82

Browse files
fqcn is only treated as namespace if the string ends with backslash, for the phpat selector it should not end with backslash though
1 parent d98721c commit dd01f82

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Kununu/ArchitectureSniffer/Configuration/Selector/RegexTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public function makeRegex(string $path, bool $file = false): string
1212
$path = substr($path, 1);
1313
}
1414

15+
if (str_ends_with($path, '\\')) {
16+
$path = substr($path, 0, -1);
17+
}
18+
1519
$path = str_replace('\\', '\\\\', $path);
1620

1721
return '/' . str_replace('*', '.+', $path) . '/';

0 commit comments

Comments
 (0)