un-preslash only quote or @

This commit is contained in:
TomasVotruba 2020-06-05 11:58:20 +02:00
parent 3da597a76c
commit 43bdd14a4f
2 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,6 @@ final class StaticEasyPrefixer
public static function unPreSlashQuotedValues(string $content): string
{
return Strings::replace($content, '#\'\\\\#', "'");
return Strings::replace($content, '#\'\\\\(\w|@)#', "'$1");
}
}

View File

@ -36,5 +36,6 @@ final class StaticEasyPrefixerTest extends TestCase
public function provideDataForSlashes(): Iterator
{
yield ["'\@ORM\Entity", "'@ORM\Entity"];
yield ["'\\", "'\\"];
}
}