From e9d81e65b4b761d05303a6653b535756f67fb027 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 1 Oct 2025 17:20:51 +0700 Subject: [PATCH] [CodeQuality] Fix escape character on SimplifyRegexPatternRector part 2 --- .../Rector/FuncCall/SimplifyRegexPatternRector.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php index 4e599aa2fd6..109bfe54b92 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php @@ -21,12 +21,12 @@ final class SimplifyRegexPatternRector extends AbstractRector * @var array */ private const COMPLEX_PATTERN_TO_SIMPLE = [ - '[0-9]' => '\\d', - '[a-zA-Z0-9_]' => '\\w', - '[A-Za-z0-9_]' => '\\w', - '[0-9a-zA-Z_]' => '\\w', - '[0-9A-Za-z_]' => '\\w', - '[\r\n\t\f\v ]' => '\\s', + '[0-9]' => '\\\d', + '[a-zA-Z0-9_]' => '\\\w', + '[A-Za-z0-9_]' => '\\\w', + '[0-9a-zA-Z_]' => '\\\w', + '[0-9A-Za-z_]' => '\\\w', + '[\r\n\t\f\v ]' => '\\\s', ]; public function __construct(