Adapt to last changes in hydrator + Update GitHub actions #69
Annotations
7 warnings
mutation / PHP 8.2-ubuntu-latest:
src/HydratorAttributeParametersResolver.php#L46
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
}
return $result;
}
- public function prepareValue(Result $handleResult, ReflectionParameter $parameter) : mixed
+ protected function prepareValue(Result $handleResult, ReflectionParameter $parameter) : mixed
{
$value = $handleResult->getValue();
$typeCastResult = $this->typeCaster->cast($value, new TypeCastContext($this->hydrator, $parameter));
|
mutation / PHP 8.2-ubuntu-latest:
src/Request/RequestNotSetException.php#L12
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
use Throwable;
final class RequestNotSetException extends LogicException
{
- public function __construct(int $code = 0, ?Throwable $previous = null)
+ public function __construct(int $code = -1, ?Throwable $previous = null)
{
parent::__construct('Request is not set.', $code, $previous);
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/Request/RequestNotSetException.php#L12
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
use Throwable;
final class RequestNotSetException extends LogicException
{
- public function __construct(int $code = 0, ?Throwable $previous = null)
+ public function __construct(int $code = 1, ?Throwable $previous = null)
{
parent::__construct('Request is not set.', $code, $previous);
}
}
|
mutation / PHP 8.2-ubuntu-latest:
src/RequestInputParametersResolver.php#L19
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
use Yiisoft\Middleware\Dispatcher\ParametersResolverInterface;
final class RequestInputParametersResolver implements ParametersResolverInterface
{
- public function __construct(private HydratorInterface $hydrator, private bool $throwInputValidationException = false)
+ public function __construct(private HydratorInterface $hydrator, private bool $throwInputValidationException = true)
{
}
/**
|
mutation / PHP 8.2-ubuntu-latest:
src/RequestInputParametersResolver.php#L39
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
foreach ($parameters as $parameter) {
$type = $parameter->getType();
if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) {
- continue;
+ break;
}
$class = $type->getName();
$reflectionClass = new ReflectionClass($class);
|
mutation / PHP 8.2-ubuntu-latest:
src/RequestInputParametersResolver.php#L46
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
}
$class = $type->getName();
$reflectionClass = new ReflectionClass($class);
- if ($reflectionClass->isInstantiable() && $reflectionClass->implementsInterface(RequestInputInterface::class)) {
+ if ($reflectionClass->isInstantiable() || $reflectionClass->implementsInterface(RequestInputInterface::class)) {
/** @psalm-var class-string<RequestInputInterface> $class */
$value = $this->hydrator->create($class);
$this->processValidation($value);
|
mutation / PHP 8.2-ubuntu-latest:
src/RequestInputParametersResolver.php#L55
Escaped Mutant for Mutator "ArrayOneItem":
--- Original
+++ New
@@ @@
$result[$parameter->getName()] = $value;
}
}
- return $result;
+ return count($result) > 1 ? array_slice($result, 0, 1, true) : $result;
}
/**
* @throws InputValidationException
|