diff --git a/src/Command/IgnoredRegexValidator.php b/src/Command/IgnoredRegexValidator.php index 6daecb33f0..4340e0bd99 100644 --- a/src/Command/IgnoredRegexValidator.php +++ b/src/Command/IgnoredRegexValidator.php @@ -12,7 +12,6 @@ use PHPStan\Type\ObjectType; use PHPStan\Type\VerbosityLevel; use function count; -use function str_contains; use function strrpos; use function substr; @@ -37,10 +36,10 @@ public function validate(string $regex): IgnoredRegexValidatorResult return new IgnoredRegexValidatorResult([], false, false); } - if (str_contains($regex, '||')) { + if (Strings::match($regex, '~(?