Setup mutation testing #316
Annotations
4 errors and 30 warnings
Platform test (8.1, doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo...
Process completed with exit code 1.
|
Platform test (8.3, doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo...
Process completed with exit code 2.
|
Platform test (8.4, doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo...
Process completed with exit code 2.
|
Platform test (8.2, doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo...
Process completed with exit code 2.
|
Platform test (8.3):
src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L33
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
public function getMethodReturnTypeForHydrationMode(string $methodName, Type $hydrationMode, Type $queryKeyType, Type $queryResultType, ?ObjectManager $objectManager): ?Type
{
$isVoidType = (new VoidType())->isSuperTypeOf($queryResultType);
- if ($isVoidType->yes()) {
+ if (!$isVoidType->no()) {
// A void query result type indicates an UPDATE or DELETE query.
// In this case all methods return the number of affected rows.
return IntegerRangeType::fromInterval(0, null);
|
Platform test (8.3):
src/Type/Doctrine/GetRepositoryDynamicReturnTypeExtension.php#L92
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
return new GenericObjectType($defaultRepositoryClass, [new ObjectWithoutClassType()]);
}
$argType = $scope->getType($methodCall->getArgs()[0]->value);
- if (!$argType->isClassString()->yes()) {
+ if (!!$argType->isClassString()->no()) {
return $this->getDefaultReturnType($scope, $methodCall->getArgs(), $methodReflection, $defaultRepositoryClass);
}
$classType = $argType->getClassStringObjectType();
|
Platform test (8.3):
src/Type/Doctrine/GetRepositoryDynamicReturnTypeExtension.php#L80
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): Type
{
$calledOnType = $scope->getType($methodCall->var);
- if ((new ObjectType(DocumentManager::class))->isSuperTypeOf($calledOnType)->yes()) {
+ if (!(new ObjectType(DocumentManager::class))->isSuperTypeOf($calledOnType)->no()) {
$defaultRepositoryClass = $this->odmRepositoryClass ?? $this->repositoryClass ?? DocumentRepository::class;
} else {
$defaultRepositoryClass = $this->ormRepositoryClass ?? $this->repositoryClass ?? EntityRepository::class;
|
Platform test (8.3):
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.3):
src/Type/Doctrine/ArgumentsProcessor.php#L61
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$args[] = $array;
continue;
}
- if ($value->isClassString()->yes() && count($value->getClassStringObjectType()->getObjectClassNames()) === 1) {
+ if (!$value->isClassString()->no() && count($value->getClassStringObjectType()->getObjectClassNames()) === 1) {
/** @var class-string $className */
$className = $value->getClassStringObjectType()->getObjectClassNames()[0];
if ($this->objectMetadataResolver->isTransient($className)) {
|
Platform test (8.3):
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.3):
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.3):
src/Rules/Doctrine/ORM/EntityColumnRule.php#L110
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$writableToDatabaseType = $descriptor->getWritableToDatabaseType();
$enumTypeString = $fieldMapping['enumType'] ?? null;
if ($enumTypeString !== null) {
- if ($writableToDatabaseType->isArray()->no() && $writableToPropertyType->isArray()->no()) {
+ if ($writableToDatabaseType->isArray()->no() && !$writableToPropertyType->isArray()->yes()) {
if ($this->reflectionProvider->hasClass($enumTypeString)) {
$enumReflection = $this->reflectionProvider->getClass($enumTypeString);
$backedEnumType = $enumReflection->getBackedEnumType();
|
Platform test (8.3):
src/Rules/Doctrine/ORM/EntityColumnRule.php#L110
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$writableToDatabaseType = $descriptor->getWritableToDatabaseType();
$enumTypeString = $fieldMapping['enumType'] ?? null;
if ($enumTypeString !== null) {
- if ($writableToDatabaseType->isArray()->no() && $writableToPropertyType->isArray()->no()) {
+ if (!$writableToDatabaseType->isArray()->yes() && $writableToPropertyType->isArray()->no()) {
if ($this->reflectionProvider->hasClass($enumTypeString)) {
$enumReflection = $this->reflectionProvider->getClass($enumTypeString);
$backedEnumType = $enumReflection->getBackedEnumType();
|
Platform test (8.3):
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();
|
Platform test (8.2):
src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L33
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
public function getMethodReturnTypeForHydrationMode(string $methodName, Type $hydrationMode, Type $queryKeyType, Type $queryResultType, ?ObjectManager $objectManager): ?Type
{
$isVoidType = (new VoidType())->isSuperTypeOf($queryResultType);
- if ($isVoidType->yes()) {
+ if (!$isVoidType->no()) {
// A void query result type indicates an UPDATE or DELETE query.
// In this case all methods return the number of affected rows.
return IntegerRangeType::fromInterval(0, null);
|
Platform test (8.2):
src/Type/Doctrine/GetRepositoryDynamicReturnTypeExtension.php#L92
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
return new GenericObjectType($defaultRepositoryClass, [new ObjectWithoutClassType()]);
}
$argType = $scope->getType($methodCall->getArgs()[0]->value);
- if (!$argType->isClassString()->yes()) {
+ if (!!$argType->isClassString()->no()) {
return $this->getDefaultReturnType($scope, $methodCall->getArgs(), $methodReflection, $defaultRepositoryClass);
}
$classType = $argType->getClassStringObjectType();
|
Platform test (8.2):
src/Type/Doctrine/GetRepositoryDynamicReturnTypeExtension.php#L80
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): Type
{
$calledOnType = $scope->getType($methodCall->var);
- if ((new ObjectType(DocumentManager::class))->isSuperTypeOf($calledOnType)->yes()) {
+ if (!(new ObjectType(DocumentManager::class))->isSuperTypeOf($calledOnType)->no()) {
$defaultRepositoryClass = $this->odmRepositoryClass ?? $this->repositoryClass ?? DocumentRepository::class;
} else {
$defaultRepositoryClass = $this->ormRepositoryClass ?? $this->repositoryClass ?? EntityRepository::class;
|
Platform test (8.2):
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.2):
src/Type/Doctrine/ArgumentsProcessor.php#L61
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$args[] = $array;
continue;
}
- if ($value->isClassString()->yes() && count($value->getClassStringObjectType()->getObjectClassNames()) === 1) {
+ if (!$value->isClassString()->no() && count($value->getClassStringObjectType()->getObjectClassNames()) === 1) {
/** @var class-string $className */
$className = $value->getClassStringObjectType()->getObjectClassNames()[0];
if ($this->objectMetadataResolver->isTransient($className)) {
|
Platform test (8.2):
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.2):
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.2):
src/Rules/Doctrine/ORM/EntityColumnRule.php#L110
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$writableToDatabaseType = $descriptor->getWritableToDatabaseType();
$enumTypeString = $fieldMapping['enumType'] ?? null;
if ($enumTypeString !== null) {
- if ($writableToDatabaseType->isArray()->no() && $writableToPropertyType->isArray()->no()) {
+ if ($writableToDatabaseType->isArray()->no() && !$writableToPropertyType->isArray()->yes()) {
if ($this->reflectionProvider->hasClass($enumTypeString)) {
$enumReflection = $this->reflectionProvider->getClass($enumTypeString);
$backedEnumType = $enumReflection->getBackedEnumType();
|
Platform test (8.2):
src/Rules/Doctrine/ORM/EntityColumnRule.php#L110
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$writableToDatabaseType = $descriptor->getWritableToDatabaseType();
$enumTypeString = $fieldMapping['enumType'] ?? null;
if ($enumTypeString !== null) {
- if ($writableToDatabaseType->isArray()->no() && $writableToPropertyType->isArray()->no()) {
+ if (!$writableToDatabaseType->isArray()->yes() && $writableToPropertyType->isArray()->no()) {
if ($this->reflectionProvider->hasClass($enumTypeString)) {
$enumReflection = $this->reflectionProvider->getClass($enumTypeString);
$backedEnumType = $enumReflection->getBackedEnumType();
|
Platform test (8.2):
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();
|
Platform test (8.4):
src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L33
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
public function getMethodReturnTypeForHydrationMode(string $methodName, Type $hydrationMode, Type $queryKeyType, Type $queryResultType, ?ObjectManager $objectManager): ?Type
{
$isVoidType = (new VoidType())->isSuperTypeOf($queryResultType);
- if ($isVoidType->yes()) {
+ if (!$isVoidType->no()) {
// A void query result type indicates an UPDATE or DELETE query.
// In this case all methods return the number of affected rows.
return IntegerRangeType::fromInterval(0, null);
|
Platform test (8.4):
src/Type/Doctrine/GetRepositoryDynamicReturnTypeExtension.php#L92
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
return new GenericObjectType($defaultRepositoryClass, [new ObjectWithoutClassType()]);
}
$argType = $scope->getType($methodCall->getArgs()[0]->value);
- if (!$argType->isClassString()->yes()) {
+ if (!!$argType->isClassString()->no()) {
return $this->getDefaultReturnType($scope, $methodCall->getArgs(), $methodReflection, $defaultRepositoryClass);
}
$classType = $argType->getClassStringObjectType();
|
Platform test (8.4):
src/Type/Doctrine/GetRepositoryDynamicReturnTypeExtension.php#L80
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
public function getTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): Type
{
$calledOnType = $scope->getType($methodCall->var);
- if ((new ObjectType(DocumentManager::class))->isSuperTypeOf($calledOnType)->yes()) {
+ if (!(new ObjectType(DocumentManager::class))->isSuperTypeOf($calledOnType)->no()) {
$defaultRepositoryClass = $this->odmRepositoryClass ?? $this->repositoryClass ?? DocumentRepository::class;
} else {
$defaultRepositoryClass = $this->ormRepositoryClass ?? $this->repositoryClass ?? EntityRepository::class;
|
Platform test (8.4):
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):
src/Type/Doctrine/ArgumentsProcessor.php#L61
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$args[] = $array;
continue;
}
- if ($value->isClassString()->yes() && count($value->getClassStringObjectType()->getObjectClassNames()) === 1) {
+ if (!$value->isClassString()->no() && count($value->getClassStringObjectType()->getObjectClassNames()) === 1) {
/** @var class-string $className */
$className = $value->getClassStringObjectType()->getObjectClassNames()[0];
if ($this->objectMetadataResolver->isTransient($className)) {
|
Platform test (8.4):
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):
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):
src/Rules/Doctrine/ORM/EntityColumnRule.php#L110
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$writableToDatabaseType = $descriptor->getWritableToDatabaseType();
$enumTypeString = $fieldMapping['enumType'] ?? null;
if ($enumTypeString !== null) {
- if ($writableToDatabaseType->isArray()->no() && $writableToPropertyType->isArray()->no()) {
+ if ($writableToDatabaseType->isArray()->no() && !$writableToPropertyType->isArray()->yes()) {
if ($this->reflectionProvider->hasClass($enumTypeString)) {
$enumReflection = $this->reflectionProvider->getClass($enumTypeString);
$backedEnumType = $enumReflection->getBackedEnumType();
|
Platform test (8.4):
src/Rules/Doctrine/ORM/EntityColumnRule.php#L110
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$writableToDatabaseType = $descriptor->getWritableToDatabaseType();
$enumTypeString = $fieldMapping['enumType'] ?? null;
if ($enumTypeString !== null) {
- if ($writableToDatabaseType->isArray()->no() && $writableToPropertyType->isArray()->no()) {
+ if (!$writableToDatabaseType->isArray()->yes() && $writableToPropertyType->isArray()->no()) {
if ($this->reflectionProvider->hasClass($enumTypeString)) {
$enumReflection = $this->reflectionProvider->getClass($enumTypeString);
$backedEnumType = $enumReflection->getBackedEnumType();
|
Platform test (8.4):
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();
|