mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 04:19:44 +01:00
un-preslash only quote or @
This commit is contained in:
parent
3da597a76c
commit
43bdd14a4f
@ -41,6 +41,6 @@ final class StaticEasyPrefixer
|
||||
|
||||
public static function unPreSlashQuotedValues(string $content): string
|
||||
{
|
||||
return Strings::replace($content, '#\'\\\\#', "'");
|
||||
return Strings::replace($content, '#\'\\\\(\w|@)#', "'$1");
|
||||
}
|
||||
}
|
||||
|
@ -36,5 +36,6 @@ final class StaticEasyPrefixerTest extends TestCase
|
||||
public function provideDataForSlashes(): Iterator
|
||||
{
|
||||
yield ["'\@ORM\Entity", "'@ORM\Entity"];
|
||||
yield ["'\\", "'\\"];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user