Prevent TypeCombinator::intersect() calls in MutatingScope-> specifyExpressionType()
#26079
Triggered via pull request
February 26, 2026 10:51
Status
Failure
Total duration
15m 28s
Artifacts
–
tests.yml
on: pull_request
Matrix: Tests PHPUnit 12.x
Determine levels tests matrix
41s
Matrix: Integration tests
Matrix: Tests PHPUnit 11.x
Matrix: Tests with old PHPUnit
Matrix: Mutation Testing
Matrix: Levels tests
Annotations
2 errors and 18 warnings
|
Mutation Testing (8.4, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.3, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Type/Php/IsSubclassOfFunctionTypeSpecifyingExtension.php#L57
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$resultType = $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, false);
// prevent false-positives in IsAFunctionTypeSpecifyingHelper
- if ($classType->getConstantStrings() === [] && $resultType->isSuperTypeOf($objectOrClassType)->yes()) {
+ if ($classType->getConstantStrings() === [] && !$resultType->isSuperTypeOf($objectOrClassType)->no()) {
return new SpecifiedTypes([], []);
}
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Type/Php/IsSubclassOfFunctionTypeSpecifyingExtension.php#L57
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator":
@@ @@
$resultType = $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, false);
// prevent false-positives in IsAFunctionTypeSpecifyingHelper
- if ($classType->getConstantStrings() === [] && $resultType->isSuperTypeOf($objectOrClassType)->yes()) {
+ if ($classType->getConstantStrings() === [] && $objectOrClassType->isSuperTypeOf($resultType)->yes()) {
return new SpecifiedTypes([], []);
}
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Type/Php/IsAFunctionTypeSpecifyingExtension.php#L56
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$resultType = $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, true);
// prevent false-positives in IsAFunctionTypeSpecifyingHelper
- if ($classType->getConstantStrings() === [] && $resultType->isSuperTypeOf($objectOrClassType)->yes()) {
+ if ($classType->getConstantStrings() === [] && !$resultType->isSuperTypeOf($objectOrClassType)->no()) {
return new SpecifiedTypes([], []);
}
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Type/Php/IsAFunctionTypeSpecifyingExtension.php#L56
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator":
@@ @@
$resultType = $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, true);
// prevent false-positives in IsAFunctionTypeSpecifyingHelper
- if ($classType->getConstantStrings() === [] && $resultType->isSuperTypeOf($objectOrClassType)->yes()) {
+ if ($classType->getConstantStrings() === [] && $objectOrClassType->isSuperTypeOf($resultType)->yes()) {
return new SpecifiedTypes([], []);
}
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/MutatingScope.php#L3378
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (!$exprVarType instanceof MixedType && !$isArray->no()) {
$varType = $exprVarType;
if (!$isArray->yes()) {
- if ($dimType->isInteger()->yes()) {
+ if (!$dimType->isInteger()->no()) {
$varType = TypeCombinator::intersect($exprVarType, StaticTypeFactory::intOffsetAccessibleType());
} else {
$varType = TypeCombinator::intersect($exprVarType, StaticTypeFactory::generalOffsetAccessibleType());
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/MutatingScope.php#L3375
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($dimType->isInteger()->yes() || $dimType->isString()->yes()) {
$exprVarType = $scope->getType($expr->var);
$isArray = $exprVarType->isArray();
- if (!$exprVarType instanceof MixedType && !$isArray->no()) {
+ if (!$exprVarType instanceof MixedType && $isArray->yes()) {
$varType = $exprVarType;
if (!$isArray->yes()) {
if ($dimType->isInteger()->yes()) {
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/MutatingScope.php#L1862
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (
!$offsetAccessibleType->isArray()->yes()
- && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->yes()
+ && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->no()
) {
return $this->getType(
new MethodCall(
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/MutatingScope.php#L1862
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator":
@@ @@
if (
!$offsetAccessibleType->isArray()->yes()
- && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->yes()
+ && $offsetAccessibleType->isSuperTypeOf(new ObjectType(ArrayAccess::class))->yes()
) {
return $this->getType(
new MethodCall(
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/MutatingScope.php#L1861
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
}
if (
- !$offsetAccessibleType->isArray()->yes()
+ $offsetAccessibleType->isArray()->no()
&& (new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->yes()
) {
return $this->getType(
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Type/Php/IsSubclassOfFunctionTypeSpecifyingExtension.php#L57
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$resultType = $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, false);
// prevent false-positives in IsAFunctionTypeSpecifyingHelper
- if ($classType->getConstantStrings() === [] && $resultType->isSuperTypeOf($objectOrClassType)->yes()) {
+ if ($classType->getConstantStrings() === [] && !$resultType->isSuperTypeOf($objectOrClassType)->no()) {
return new SpecifiedTypes([], []);
}
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Type/Php/IsSubclassOfFunctionTypeSpecifyingExtension.php#L57
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator":
@@ @@
$resultType = $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, false);
// prevent false-positives in IsAFunctionTypeSpecifyingHelper
- if ($classType->getConstantStrings() === [] && $resultType->isSuperTypeOf($objectOrClassType)->yes()) {
+ if ($classType->getConstantStrings() === [] && $objectOrClassType->isSuperTypeOf($resultType)->yes()) {
return new SpecifiedTypes([], []);
}
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Type/Php/IsAFunctionTypeSpecifyingExtension.php#L56
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$resultType = $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, true);
// prevent false-positives in IsAFunctionTypeSpecifyingHelper
- if ($classType->getConstantStrings() === [] && $resultType->isSuperTypeOf($objectOrClassType)->yes()) {
+ if ($classType->getConstantStrings() === [] && !$resultType->isSuperTypeOf($objectOrClassType)->no()) {
return new SpecifiedTypes([], []);
}
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Type/Php/IsAFunctionTypeSpecifyingExtension.php#L56
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator":
@@ @@
$resultType = $this->isAFunctionTypeSpecifyingHelper->determineType($objectOrClassType, $classType, $allowString, true);
// prevent false-positives in IsAFunctionTypeSpecifyingHelper
- if ($classType->getConstantStrings() === [] && $resultType->isSuperTypeOf($objectOrClassType)->yes()) {
+ if ($classType->getConstantStrings() === [] && $objectOrClassType->isSuperTypeOf($resultType)->yes()) {
return new SpecifiedTypes([], []);
}
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/MutatingScope.php#L3378
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (!$exprVarType instanceof MixedType && !$isArray->no()) {
$varType = $exprVarType;
if (!$isArray->yes()) {
- if ($dimType->isInteger()->yes()) {
+ if (!$dimType->isInteger()->no()) {
$varType = TypeCombinator::intersect($exprVarType, StaticTypeFactory::intOffsetAccessibleType());
} else {
$varType = TypeCombinator::intersect($exprVarType, StaticTypeFactory::generalOffsetAccessibleType());
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/MutatingScope.php#L3375
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($dimType->isInteger()->yes() || $dimType->isString()->yes()) {
$exprVarType = $scope->getType($expr->var);
$isArray = $exprVarType->isArray();
- if (!$exprVarType instanceof MixedType && !$isArray->no()) {
+ if (!$exprVarType instanceof MixedType && $isArray->yes()) {
$varType = $exprVarType;
if (!$isArray->yes()) {
if ($dimType->isInteger()->yes()) {
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/MutatingScope.php#L1862
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (
!$offsetAccessibleType->isArray()->yes()
- && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->yes()
+ && !(new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->no()
) {
return $this->getType(
new MethodCall(
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/MutatingScope.php#L1862
Escaped Mutant for Mutator "PHPStan\Infection\IsSuperTypeOfCalleeAndArgumentMutator":
@@ @@
if (
!$offsetAccessibleType->isArray()->yes()
- && (new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->yes()
+ && $offsetAccessibleType->isSuperTypeOf(new ObjectType(ArrayAccess::class))->yes()
) {
return $this->getType(
new MethodCall(
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/MutatingScope.php#L1861
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
}
if (
- !$offsetAccessibleType->isArray()->yes()
+ $offsetAccessibleType->isArray()->no()
&& (new ObjectType(ArrayAccess::class))->isSuperTypeOf($offsetAccessibleType)->yes()
) {
return $this->getType(
|