diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php index 5c1d1617abe..02a1342256c 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php @@ -73,8 +73,7 @@ CODE_SAMPLE if ($originalValue === $simplifiedValue) { continue; } - $countSqureOpenBracket = \substr_count($simplifiedValue, '['); - if ($countSqureOpenBracket % 2 === 1) { + if (\strpos($originalValue, '[^' . $complexPattern) !== \false) { continue; } $node->value = $simplifiedValue; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3f0ab00a3c1..d75cb4a34dd 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'dd02659ec90240c9452ccb86e48fb53879572935'; + public const PACKAGE_VERSION = 'c2cdcd3922d06924acfbf4a792eec61dccbee03e'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-01-23 22:50:30'; + public const RELEASE_DATE = '2024-01-23 16:35:33'; /** * @var int */