improve tests #112
Annotations
40 warnings
PHP 8.2 test on ubuntu-24.04:
src/Arguments.php#L183
Escaped Mutant for Mutator "UnwrapArraySlice":
@@ @@
return;
}
if ($this->isPositional) {
- $this->arguments = array_slice($this->arguments, 0, $this->parameters->count());
+ $this->arguments = $this->arguments;
return;
}
$count = 0;
|
PHP 8.2 test on ubuntu-24.04:
src/Arguments.php#L191
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#L193
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#L204
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#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#L264
Escaped Mutant for Mutator "Continue_":
@@ @@
$current =& $current[$key];
}
if (!is_array($current)) {
- continue;
+ break;
}
if (array_key_exists($name, $current)) {
unset($current);
|
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 "UnwrapArraySlice":
@@ @@
return;
}
if ($this->isPositional) {
- $this->arguments = array_slice($this->arguments, 0, $this->parameters->count());
+ $this->arguments = $this->arguments;
return;
}
$count = 0;
|
PHP 8.1 test on ubuntu-24.04:
src/Arguments.php#L191
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#L193
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#L204
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#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#L264
Escaped Mutant for Mutator "Continue_":
@@ @@
$current =& $current[$key];
}
if (!is_array($current)) {
- continue;
+ break;
}
if (array_key_exists($name, $current)) {
unset($current);
|
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)));
|
PHP 8.4 test on ubuntu-24.04:
src/Arguments.php#L183
Escaped Mutant for Mutator "UnwrapArraySlice":
@@ @@
return;
}
if ($this->isPositional) {
- $this->arguments = array_slice($this->arguments, 0, $this->parameters->count());
+ $this->arguments = $this->arguments;
return;
}
$count = 0;
|
PHP 8.4 test on ubuntu-24.04:
src/Arguments.php#L191
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#L193
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#L204
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#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#L264
Escaped Mutant for Mutator "Continue_":
@@ @@
$current =& $current[$key];
}
if (!is_array($current)) {
- continue;
+ break;
}
if (array_key_exists($name, $current)) {
unset($current);
|
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.3 test on ubuntu-24.04:
src/Arguments.php#L183
Escaped Mutant for Mutator "UnwrapArraySlice":
@@ @@
return;
}
if ($this->isPositional) {
- $this->arguments = array_slice($this->arguments, 0, $this->parameters->count());
+ $this->arguments = $this->arguments;
return;
}
$count = 0;
|
PHP 8.3 test on ubuntu-24.04:
src/Arguments.php#L191
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#L193
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#L204
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#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#L264
Escaped Mutant for Mutator "Continue_":
@@ @@
$current =& $current[$key];
}
if (!is_array($current)) {
- continue;
+ break;
}
if (array_key_exists($name, $current)) {
unset($current);
|
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)));
|