allow empty array iterables #129
Annotations
40 warnings
PHP 8.3 test on ubuntu-24.04:
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]);
|
PHP 8.3 test on ubuntu-24.04:
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;
}
|
PHP 8.3 test on ubuntu-24.04:
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]);
|
PHP 8.3 test on ubuntu-24.04:
src/Arguments.php#L214
Escaped Mutant for Mutator "LogicalNot":
@@ @@
if ($parameter instanceof ArrayParameterInterface) {
$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;
|
PHP 8.3 test on ubuntu-24.04:
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?
|
PHP 8.3 test on ubuntu-24.04:
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) {
|
PHP 8.3 test on ubuntu-24.04:
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();
|
PHP 8.3 test on ubuntu-24.04:
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;
$missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
$missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
|
PHP 8.3 test on ubuntu-24.04:
src/Arguments.php#L283
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
return;
}
$argumentKeys = array_keys($this->arguments);
- $missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
+ $missingNamed = $this->parameters()->keys();
$missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
$missing = array_unique(array_merge($missingNamed, $missingPositional));
|
PHP 8.3 test on ubuntu-24.04:
src/Arguments.php#L287
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
}
$argumentKeys = array_keys($this->arguments);
$missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
- $missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
+ $missingPositional = array_keys($this->parameters()->keys());
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
$missing = array_unique(array_merge($missingNamed, $missingPositional));
throw new ArgumentCountError((string) message('Missing required argument(s): `%missing%`', missing: implode(', ', $missing)));
|
PHP 8.4 test on ubuntu-24.04:
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]);
|
PHP 8.4 test on ubuntu-24.04:
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;
}
|
PHP 8.4 test on ubuntu-24.04:
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]);
|
PHP 8.4 test on ubuntu-24.04:
src/Arguments.php#L214
Escaped Mutant for Mutator "LogicalNot":
@@ @@
if ($parameter instanceof ArrayParameterInterface) {
$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;
|
PHP 8.4 test on ubuntu-24.04:
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?
|
PHP 8.4 test on ubuntu-24.04:
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) {
|
PHP 8.4 test on ubuntu-24.04:
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();
|
PHP 8.4 test on ubuntu-24.04:
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;
$missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
$missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
|
PHP 8.4 test on ubuntu-24.04:
src/Arguments.php#L283
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
return;
}
$argumentKeys = array_keys($this->arguments);
- $missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
+ $missingNamed = $this->parameters()->keys();
$missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
$missing = array_unique(array_merge($missingNamed, $missingPositional));
|
PHP 8.4 test on ubuntu-24.04:
src/Arguments.php#L287
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
}
$argumentKeys = array_keys($this->arguments);
$missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
- $missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
+ $missingPositional = array_keys($this->parameters()->keys());
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
$missing = array_unique(array_merge($missingNamed, $missingPositional));
throw new ArgumentCountError((string) message('Missing required argument(s): `%missing%`', missing: implode(', ', $missing)));
|
PHP 8.2 test on ubuntu-24.04:
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]);
|
PHP 8.2 test on ubuntu-24.04:
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;
}
|
PHP 8.2 test on ubuntu-24.04:
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]);
|
PHP 8.2 test on ubuntu-24.04:
src/Arguments.php#L214
Escaped Mutant for Mutator "LogicalNot":
@@ @@
if ($parameter instanceof ArrayParameterInterface) {
$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;
|
PHP 8.2 test on ubuntu-24.04:
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?
|
PHP 8.2 test on ubuntu-24.04:
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) {
|
PHP 8.2 test on ubuntu-24.04:
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();
|
PHP 8.2 test on ubuntu-24.04:
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;
$missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
$missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
|
PHP 8.2 test on ubuntu-24.04:
src/Arguments.php#L283
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
return;
}
$argumentKeys = array_keys($this->arguments);
- $missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
+ $missingNamed = $this->parameters()->keys();
$missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
$missing = array_unique(array_merge($missingNamed, $missingPositional));
|
PHP 8.2 test on ubuntu-24.04:
src/Arguments.php#L287
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
}
$argumentKeys = array_keys($this->arguments);
$missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
- $missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
+ $missingPositional = array_keys($this->parameters()->keys());
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
$missing = array_unique(array_merge($missingNamed, $missingPositional));
throw new ArgumentCountError((string) message('Missing required argument(s): `%missing%`', missing: implode(', ', $missing)));
|
PHP 8.1 test on ubuntu-24.04:
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]);
|
PHP 8.1 test on ubuntu-24.04:
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;
}
|
PHP 8.1 test on ubuntu-24.04:
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]);
|
PHP 8.1 test on ubuntu-24.04:
src/Arguments.php#L214
Escaped Mutant for Mutator "LogicalNot":
@@ @@
if ($parameter instanceof ArrayParameterInterface) {
$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;
|
PHP 8.1 test on ubuntu-24.04:
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?
|
PHP 8.1 test on ubuntu-24.04:
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) {
|
PHP 8.1 test on ubuntu-24.04:
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();
|
PHP 8.1 test on ubuntu-24.04:
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;
$missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
$missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
|
PHP 8.1 test on ubuntu-24.04:
src/Arguments.php#L283
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
return;
}
$argumentKeys = array_keys($this->arguments);
- $missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
+ $missingNamed = $this->parameters()->keys();
$missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
$missing = array_unique(array_merge($missingNamed, $missingPositional));
|
PHP 8.1 test on ubuntu-24.04:
src/Arguments.php#L287
Escaped Mutant for Mutator "UnwrapArrayDiff":
@@ @@
}
$argumentKeys = array_keys($this->arguments);
$missingNamed = array_diff($this->parameters()->keys(), $argumentKeys);
- $missingPositional = array_diff(array_keys($this->parameters()->keys()), $argumentKeys);
+ $missingPositional = array_keys($this->parameters()->keys());
$missingPositional = array_map(fn(int $key) => $this->parameters()->keys()[$key], $missingPositional);
$missing = array_unique(array_merge($missingNamed, $missingPositional));
throw new ArgumentCountError((string) message('Missing required argument(s): `%missing%`', missing: implode(', ', $missing)));
|