Fix summary in debug collector #4133
Annotations
1 error and 2 warnings
mutation / PHP 8.1-ubuntu-latest
Process completed with exit code 1.
|
mutation / PHP 8.1-ubuntu-latest:
src/Rule/RegexHandler.php#L37
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
--- Original
+++ New
@@ @@
if (!is_string($value)) {
return $result->addError($rule->getIncorrectInputMessage(), ['attribute' => $context->getTranslatedAttribute(), 'type' => get_debug_type($value)]);
}
- if (!$rule->isNot() && !preg_match($rule->getPattern(), $value) || $rule->isNot() && preg_match($rule->getPattern(), $value)) {
+ if (!$rule->isNot() && !preg_match($rule->getPattern(), $value) || !$rule->isNot() && !preg_match($rule->getPattern(), $value)) {
$result->addError($rule->getMessage(), ['attribute' => $context->getTranslatedAttribute(), 'value' => $value]);
}
return $result;
}
}
|
mutation / PHP 8.1-ubuntu-latest:
src/Rule/Url.php#L81
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
*/
public function __construct(private string $pattern = '/^{schemes}:\\/\\/(([a-zA-Z0-9][a-zA-Z0-9_-]*)(\\.[a-zA-Z0-9][a-zA-Z0-9_-]*)+)(?::\\d{1,5})?([?\\/#].*$|$)/', private array $validSchemes = ['http', 'https'], private bool $enableIdn = false, private string $incorrectInputMessage = 'The value must be a string.', private string $message = 'This value is not a valid URL.', private mixed $skipOnEmpty = null, private bool $skipOnError = false, private Closure|null $when = null)
{
- if ($enableIdn && !function_exists('idn_to_ascii')) {
+ if (!$enableIdn && !function_exists('idn_to_ascii')) {
// Tested via separate CI configuration (see ".github/workflows/build.yml").
// @codeCoverageIgnoreStart
throw new RuntimeException('In order to use IDN validation intl extension must be installed and enabled.');
|