fix missing report #131
Annotations
10 warnings
Mutation testing (Infection):
src/Arguments.php#L183
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
$this->arguments = array_slice($this->arguments, 0, $this->parameters->count());
return;
}
- $count = 0;
+ $count = -1;
foreach (array_keys($this->arguments) as $key) {
if ($count >= $this->parameters->count()) {
unset($this->arguments[$key]);
|
Mutation testing (Infection):
src/Arguments.php#L185
Escaped Mutant for Mutator "GreaterThanOrEqualTo":
@@ @@
}
$count = 0;
foreach (array_keys($this->arguments) as $key) {
- if ($count >= $this->parameters->count()) {
+ if ($count > $this->parameters->count()) {
unset($this->arguments[$key]);
continue;
}
|
Mutation testing (Infection):
src/Arguments.php#L196
Escaped Mutant for Mutator "Increment":
@@ @@
$name = $this->parameters->keys()[$key] ?? null;
}
if ($name && $this->parameters->has($name)) {
- $count++;
+ $count--;
continue;
}
unset($this->arguments[$key]);
|
Mutation testing (Infection):
src/Arguments.php#L214
Escaped Mutant for Mutator "LogicalNot":
@@ @@
if ($parameter instanceof ArrayTypeParameterInterface) {
$hasStock = array_key_exists($id, $this->arguments);
$this->handleDefaultNested($parameter, $id);
- if (!$hasStock && ($this->arguments[$id] ?? []) === []) {
+ if ($hasStock && ($this->arguments[$id] ?? []) === []) {
unset($this->arguments[$id]);
}
continue;
|
Mutation testing (Infection):
src/Arguments.php#L244
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
}
private function handleDefaultNested(ParametersAccessInterface $access, string ...$id): void
{
- if ($access->parameters()->keys() === ['K', 'V']) {
+ if ($access->parameters()->keys() === ['V']) {
return;
}
// If union?
|
Mutation testing (Infection):
src/Arguments.php#L254
Escaped Mutant for Mutator "Continue_":
@@ @@
$args = $id;
$args[] = $name;
$this->handleDefaultNested($parameter, ...$args);
- continue;
+ break;
}
$current =& $this->arguments;
foreach ($id as $key) {
|
Mutation testing (Infection):
src/Arguments.php#L269
Escaped Mutant for Mutator "Continue_":
@@ @@
}
if (array_key_exists($name, $current)) {
unset($current);
- continue;
+ break;
}
if ($parameter->default() !== null) {
$current[$name] = $parameter->default();
|
Mutation testing (Infection):
src/Arguments.php#L282
Escaped Mutant for Mutator "UnwrapArrayKeys":
@@ @@
if ($this->parameters()->requiredKeys()->count() <= $this->count) {
return;
}
- $argumentKeys = array_keys($this->arguments);
+ $argumentKeys = $this->arguments;
if ($this->isPositional) {
$missing = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missing = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missing);
|
Mutation testing (Infection):
src/Arguments.php#L284
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
}
$argumentKeys = array_keys($this->arguments);
if ($this->isPositional) {
- $missing = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
+ $missing = array_keys($this->parameters()->keys());
$missing = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missing);
} else {
$missing = array_diff($this->parameters()->keys(), $argumentKeys);
|
Mutation testing (Infection):
src/Arguments.php#L379
Escaped Mutant for Mutator "LessThan":
@@ @@
if ($this->isPositional) {
$variadicKeys = array_slice($argumentsKeys, $pos);
} else {
- $variadicKeys = array_filter($argumentsKeys, fn(string|int $key) => !in_array($key, $this->parameters->keys(), true) && !(is_int($key) && $key < $pos));
+ $variadicKeys = array_filter($argumentsKeys, fn(string|int $key) => !in_array($key, $this->parameters->keys(), true) && !(is_int($key) && $key <= $pos));
}
foreach ($variadicKeys as $id) {
try {
|
Loading