try errors #27
Annotations
10 warnings
Mutation testing (Infection):
src/Arguments.php#L60
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
if ($arguments instanceof ArrayAccess) {
$arguments = $this->getArrayAccessArray($arguments);
}
- if (array_is_list($arguments) && count($arguments) === count($parameters)) {
+ if (!array_is_list($arguments) && count($arguments) === count($parameters)) {
$arguments = array_combine($parameters->keys(), $arguments);
}
$this->setArguments($arguments);
|
Mutation testing (Infection):
src/Arguments.php#L61
Escaped Mutant for Mutator "UnwrapArrayCombine":
--- Original
+++ New
@@ @@
$arguments = $this->getArrayAccessArray($arguments);
}
if (array_is_list($arguments) && count($arguments) === count($parameters)) {
- $arguments = array_combine($parameters->keys(), $arguments);
+ $arguments = $arguments;
}
$this->setArguments($arguments);
if ($parameters->keys() === ['K', 'V']) {
|
Mutation testing (Infection):
src/Attributes/CallableAttr.php#L29
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
public function __construct(callable $callable)
{
$return = $callable();
- object(ParameterInterface::class)($return);
+
$this->parameter = $return;
}
public function __invoke(mixed $mixed) : mixed
|
Mutation testing (Infection):
src/FloatParameter.php#L38
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
private ?float $max = null;
public function __invoke(float $value) : float
{
- $this->assert($value);
+
return $value;
}
public function withDefault(float $value) : FloatParameterInterface
|
Mutation testing (Infection):
src/NullParameter.php#L36
Escaped Mutant for Mutator "Throw_":
--- Original
+++ New
@@ @@
if ($value === null) {
return $value;
}
- throw new TypeError((string) message('Argument value provided is not of type null'));
+ new TypeError((string) message('Argument value provided is not of type null'));
}
/**
* @codeCoverageIgnore
|
Mutation testing (Infection):
src/NullParameter.php#L37
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
if ($value === null) {
return $value;
}
- throw new TypeError((string) message('Argument value provided is not of type null'));
+ throw new TypeError(message('Argument value provided is not of type null'));
}
/**
* @codeCoverageIgnore
|
Mutation testing (Infection):
src/ObjectParameter.php#L40
Escaped Mutant for Mutator "Throw_":
--- Original
+++ New
@@ @@
if ($this->type->validate($value)) {
return $value;
}
- throw new TypeError((string) message('Argument value provided is not of type `%type%`', type: $this->className()));
+ new TypeError((string) message('Argument value provided is not of type `%type%`', type: $this->className()));
}
public function setUp() : void
{
|
Mutation testing (Infection):
src/ObjectParameter.php#L41
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
if ($this->type->validate($value)) {
return $value;
}
- throw new TypeError((string) message('Argument value provided is not of type `%type%`', type: $this->className()));
+ throw new TypeError(message('Argument value provided is not of type `%type%`', type: $this->className()));
}
public function setUp() : void
{
|
Mutation testing (Infection):
src/Traits/NumericParameterTrait.php#L266
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
return $argument;
}
$values = implode(',', $this->reject);
- throw new InvalidArgumentException((string) message('Argument value provided `%provided%` is on rejected list `%value%`', provided: strval($argument), value: "[{$values}]"));
+ throw new InvalidArgumentException(message('Argument value provided `%provided%` is on rejected list `%value%`', provided: strval($argument), value: "[{$values}]"));
}
if ($this->min() !== null && $argument < $this->min()) {
throw new InvalidArgumentException((string) message('Argument value provided `%provided%` is less than `%min%`', provided: strval($argument), min: strval($this->min())));
|
Mutation testing (Infection):
src/UnionParameter.php#L63
Escaped Mutant for Mutator "Throw_":
--- Original
+++ New
@@ @@
}
$types = implode('|', $types);
$errors = implode('; ', $errors);
- throw new TypeError((string) message("Argument provided doesn't match the union type `%types%`. Error(s): %errors%", types: $types, errors: $errors));
+ new TypeError((string) message("Argument provided doesn't match the union type `%types%`. Error(s): %errors%", types: $types, errors: $errors));
}
public function withAdded(ParameterInterface ...$parameter) : static
{
|
The logs for this run have expired and are no longer available.
Loading