Skip to content

Commit

Permalink
double slash typo
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed May 13, 2021
1 parent b9e96e7 commit 1ba477b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$timestamp = $dateTime->format('Ymd');

/**
* @var array<string, string>
* @var array<string, string[]>
*/
const UNPREFIX_CLASSES_BY_FILE = [
// make UT=1 in tests work
Expand Down Expand Up @@ -76,11 +76,11 @@ function (string $filePath, string $prefix, string $content): string {
}

foreach ($unprefixClasses as $unprefixClass) {
$doubleQuotedClass = preg_quote(preg_quote('\\' . $unprefixClass));
$doubleQuotedClass = preg_quote(preg_quote($unprefixClass));

$content = Strings::replace(
$content,
'#' . $prefix . '\\' . $doubleQuotedClass . '#',
'#' . $prefix . '\\\\' . $doubleQuotedClass . '#',
$unprefixClass
);
}
Expand Down

0 comments on commit 1ba477b

Please sign in to comment.