Add $key to callback #4237
Annotations
1 error and 4 warnings
mutation / PHP 8.1-ubuntu-latest
Process completed with exit code 1.
|
mutation / PHP 8.1-ubuntu-latest:
src/Rule/EachHandler.php#L63
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$result->addError($error->getMessage(), $error->getParameters(), $error->getValuePath() === [] ? [$index] : [$index, ...$error->getValuePath()]);
}
}
- $context->setParameter(ValidationContext::PARAMETER_CURRENT_EACH_INDEX, null);
+
return $result;
}
}
|
mutation / PHP 8.1-ubuntu-latest:
src/Rule/Email.php#L119
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
throw new InvalidArgumentException('IDN e-mail pattern can\'t be empty.');
}
$this->idnEmailPattern = $idnEmailPattern;
- 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.');
|
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#L98
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
* @psalm-var non-empty-string $pattern
*/
$this->pattern = $pattern;
- 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.');
|