Test coverage 100% #304
Annotations
10 warnings
src/Attribute/Parameter/DiResolver.php#L48
Escaped Mutant for Mutator "Throw_":
--- Original
+++ New
@@ @@
try {
return Result::success($this->container->get($id));
} catch (NotFoundExceptionInterface $e) {
- throw new DiNotFoundException($parameter, $e);
+ new DiNotFoundException($parameter, $e);
}
}
$type = $parameter->getType();
|
src/Attribute/Parameter/ToString.php#L33
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
if ($context->isResolved()) {
$resolvedValue = $context->getResolvedValue();
if (is_scalar($resolvedValue) || null === $resolvedValue || $resolvedValue instanceof Stringable) {
- return Result::success((string) $resolvedValue);
+ return Result::success($resolvedValue);
}
return Result::success('');
}
|
src/AttributeHandling/ResolverFactory/ReflectionAttributeResolverFactory.php#L53
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
if (!$constructor->isPublic()) {
throw new AttributeResolverNonInstantiableException(sprintf('Class "%s" is not instantiable because contain non-public constructor.', $constructor->getDeclaringClass()->getName()));
}
- if ($constructor->getNumberOfRequiredParameters() > 0) {
+ if ($constructor->getNumberOfRequiredParameters() >= 0) {
throw new AttributeResolverNonInstantiableException(sprintf('Class "%s" cannot be instantiated because it has %d required parameters in constructor.', $constructor->getDeclaringClass()->getName(), $constructor->getNumberOfRequiredParameters()));
}
}
|
src/Exception/AbstractClassException.php#L13
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
public function __construct(ReflectionClass $reflectionClass)
{
- parent::__construct(sprintf('%s is not instantiable because it is abstract.', $reflectionClass->getName()));
+
}
}
|
src/Exception/NonExistClassException.php#L11
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
public function __construct(string $class)
{
- parent::__construct(sprintf('Class %s not exist.', $class));
+
}
}
|
src/Exception/WrongConstructorArgumentsCountException.php#L13
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
public function __construct(ReflectionMethod $constructor, int $countArguments)
{
- parent::__construct(sprintf('Class "%s" cannot be instantiated because it has %d required parameters in constructor, but passed only %d.', $constructor->getDeclaringClass()->getName(), $constructor->getNumberOfRequiredParameters(), $countArguments));
+
}
}
|
src/Hydrator.php#L144
Escaped Mutant for Mutator "LessThan":
--- Original
+++ New
@@ @@
if ($resolveResult->isResolved()) {
$result = $this->typeCaster->cast($resolveResult->getValue(), new TypeCastContext($this, $property));
if ($result->isResolved()) {
- if (PHP_VERSION_ID < 80100) {
+ if (PHP_VERSION_ID <= 80100) {
$property->setAccessible(true);
}
$property->setValue($object, $result->getValue());
|
src/Hydrator.php#L144
Escaped Mutant for Mutator "LessThanNegotiation":
--- Original
+++ New
@@ @@
if ($resolveResult->isResolved()) {
$result = $this->typeCaster->cast($resolveResult->getValue(), new TypeCastContext($this, $property));
if ($result->isResolved()) {
- if (PHP_VERSION_ID < 80100) {
+ if (PHP_VERSION_ID >= 80100) {
$property->setAccessible(true);
}
$property->setValue($object, $result->getValue());
|
src/Internal/ReflectionFilter.php#L34
Escaped Mutant for Mutator "GreaterThanOrEqualTo":
--- Original
+++ New
@@ @@
continue;
}
/** @psalm-suppress UndefinedMethod Need for PHP 8.0 only */
- if (PHP_VERSION_ID >= 80100 && $property->isReadOnly()) {
+ if (PHP_VERSION_ID > 80100 && $property->isReadOnly()) {
continue;
}
$propertyName = $property->getName();
|
src/TypeCaster/HydratorTypeCaster.php#L39
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
}
foreach ($type->getTypes() as $t) {
if (!$t instanceof ReflectionNamedType) {
- continue;
+ break;
}
$result = $this->castInternal($value, $t, $hydrator);
if ($result->isResolved()) {
|
The logs for this run have expired and are no longer available.
Loading