Skip to content

Setup mutation testing #310

Setup mutation testing

Setup mutation testing #310

Triggered via pull request October 4, 2025 11:57
@staabmstaabm
synchronize #686
staabm:infect
Status Failure
Total duration 4m 32s
Artifacts

platform-test.yml

on: pull_request
Matrix: Platform test
Fit to window
Zoom out
Zoom in

Annotations

1 error and 10 warnings
Platform test (8.4, true, infection/infection): src/Type/Doctrine/Query/QueryResultTypeWalker.php#L784
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ $exprTypeNoNull = TypeCombinator::removeNull($exprType); $nullable = $this->canBeNull($exprType) || $this->hasAggregateWithoutGroupBy(); if ($this->driverType === DriverDetector::SQLITE3 || $this->driverType === DriverDetector::PDO_SQLITE) { - if ($exprTypeNoNull->isString()->yes() && !$exprTypeNoNull->isNumericString()->yes()) { + if ($exprTypeNoNull->isString()->yes() && !!$exprTypeNoNull->isNumericString()->no()) { return $this->createFloat($nullable); } return $this->generalizeConstantType($exprType, $nullable);
Platform test (8.4, true, infection/infection): src/Type/Doctrine/Query/QueryResultTypeWalker.php#L784
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ $exprTypeNoNull = TypeCombinator::removeNull($exprType); $nullable = $this->canBeNull($exprType) || $this->hasAggregateWithoutGroupBy(); if ($this->driverType === DriverDetector::SQLITE3 || $this->driverType === DriverDetector::PDO_SQLITE) { - if ($exprTypeNoNull->isString()->yes() && !$exprTypeNoNull->isNumericString()->yes()) { + if (!$exprTypeNoNull->isString()->no() && !$exprTypeNoNull->isNumericString()->yes()) { return $this->createFloat($nullable); } return $this->generalizeConstantType($exprType, $nullable);
Platform test (8.4, true, infection/infection): src/Type/Doctrine/Query/QueryResultTypeWalker.php#L575
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ $secondExprType = $this->unmarshalType($this->walkSimpleArithmeticExpression($function->secondSimpleArithmeticExpression)); $union = TypeCombinator::union($firstExprType, $secondExprType); $unionNoNull = TypeCombinator::removeNull($union); - if (!$unionNoNull->isInteger()->yes()) { + if (!!$unionNoNull->isInteger()->no()) { return $this->marshalType(new MixedType()); // dont try to deal with non-integer chaos }
Platform test (8.4, true, infection/infection): src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L94
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ } private function getSimpleObjectHydratedReturnType(Type $queryResultType): ?Type { - if ((new ObjectWithoutClassType())->isSuperTypeOf($queryResultType)->yes()) { + if (!(new ObjectWithoutClassType())->isSuperTypeOf($queryResultType)->no()) { return $queryResultType; } return null; } }
Platform test (8.4, true, infection/infection): src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L79
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ case 'toIterable': return new IterableType($queryKeyType->isNull()->yes() ? new IntegerType() : $queryKeyType, $queryResultType); default: - if ($queryKeyType->isNull()->yes()) { + if (!$queryKeyType->isNull()->no()) { return TypeCombinator::intersect(new ArrayType(new IntegerType(), $queryResultType), new AccessoryArrayListType()); } return new ArrayType($queryKeyType, $queryResultType);
Platform test (8.4, true, infection/infection): src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L75
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ } return $nullableQueryResultType; case 'toIterable': - return new IterableType($queryKeyType->isNull()->yes() ? new IntegerType() : $queryKeyType, $queryResultType); + return new IterableType(!$queryKeyType->isNull()->no() ? new IntegerType() : $queryKeyType, $queryResultType); default: if ($queryKeyType->isNull()->yes()) { return TypeCombinator::intersect(new ArrayType(new IntegerType(), $queryResultType), new AccessoryArrayListType());
Platform test (8.4, true, infection/infection): src/Type/Doctrine/EntityManagerInterfaceThrowTypeExtension.php#L38
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ public function getThrowTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): ?Type { $type = $scope->getType($methodCall->var); - if ((new ObjectType(EntityManagerInterface::class))->isSuperTypeOf($type)->yes()) { + if (!(new ObjectType(EntityManagerInterface::class))->isSuperTypeOf($type)->no()) { return TypeCombinator::union(...array_map(static fn($class): Type => new ObjectType($class), self::SUPPORTED_METHOD[$methodReflection->getName()])); } return $methodReflection->getThrowType(); } }
Platform test (8.4, true, infection/infection): src/Rules/Doctrine/ORM/EntityRelationRule.php#L112
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ } $collectionObjectType = new ObjectType('Doctrine\Common\Collections\Collection'); $propertyTypeToCheckAgainst = $propertyType; - if ($toMany && $collectionObjectType->isSuperTypeOf($propertyType)->yes() && $propertyType->isIterable()->yes()) { + if ($toMany && $collectionObjectType->isSuperTypeOf($propertyType)->yes() && !$propertyType->isIterable()->no()) { $propertyTypeToCheckAgainst = TypeCombinator::intersect($collectionObjectType, new IterableType(new MixedType(true), $propertyType->getIterableValueType())); } if (!$propertyTypeToCheckAgainst->isSuperTypeOf($columnType)->yes()) {
Platform test (8.4, true, infection/infection): src/Rules/Doctrine/ORM/EntityRelationRule.php#L111
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ } $collectionObjectType = new ObjectType('Doctrine\Common\Collections\Collection'); $propertyTypeToCheckAgainst = $propertyType; - if ($toMany && $collectionObjectType->isSuperTypeOf($propertyType)->yes() && $propertyType->isIterable()->yes()) { + if ($toMany && !$collectionObjectType->isSuperTypeOf($propertyType)->no() && $propertyType->isIterable()->yes()) { $propertyTypeToCheckAgainst = TypeCombinator::intersect($collectionObjectType, new IterableType(new MixedType(true), $propertyType->getIterableValueType())); } if (!$propertyTypeToCheckAgainst->isSuperTypeOf($columnType)->yes()) {
Platform test (8.4, true, infection/infection): src/Rules/Doctrine/ORM/DqlRule.php#L52
Escaped Mutant for Mutator "TrinaryLogicMutator": @@ @@ } $calledOnType = $scope->getType($node->var); $entityManagerInterface = 'Doctrine\ORM\EntityManagerInterface'; - if (!(new ObjectType($entityManagerInterface))->isSuperTypeOf($calledOnType)->yes()) { + if (!!(new ObjectType($entityManagerInterface))->isSuperTypeOf($calledOnType)->no()) { return []; } $dqls = $scope->getType($node->getArgs()[0]->value)->getConstantStrings();