add Type::isNever and Type::isExplicitNever methods #23702
Triggered via pull request
November 11, 2025 13:26
Status
Failure
Total duration
4h 59m 32s
Artifacts
–
tests.yml
on: pull_request
Matrix: Tests
Determine levels tests matrix
58s
Matrix: Integration tests
Matrix: Tests with old PHPUnit
Matrix: Mutation Testing
Matrix: Levels tests
Annotations
3 errors and 33 warnings
|
Mutation Testing (8.4, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.2, 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/Analyser/NodeScopeResolver.php#L4199
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$matchScope = $matchScope->filterByFalseyValue($filteringExpr);
}
$remainingType = $matchScope->getType($expr->cond);
- if (!$hasDefaultCond && !$hasAlwaysTrueCond && $remainingType->isNever()->no()) {
+ if (!$hasDefaultCond && !$hasAlwaysTrueCond && !$remainingType->isNever()->yes()) {
$throwPoints[] = ThrowPoint::createExplicit($scope, new ObjectType(UnhandledMatchError::class), $expr, false);
}
ksort($armNodes, SORT_NUMERIC);
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3944
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$finalScope = $ifFalseScope;
} else {
$ifFalseType = $ifFalseScope->getType($expr->else);
- if ($ifFalseType->isExplicitNever()->yes()) {
+ if (!$ifFalseType->isExplicitNever()->no()) {
$finalScope = $ifTrueScope;
} else {
$finalScope = $ifTrueScope->mergeWith($ifFalseScope);
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3939
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$finalScope = $ifTrueScope;
} elseif ($condType->isFalse()->yes()) {
$finalScope = $ifFalseScope;
- } else if ($ifTrueType !== null && $ifTrueType->isExplicitNever()->yes()) {
+ } else if ($ifTrueType !== null && !$ifTrueType->isExplicitNever()->no()) {
$finalScope = $ifFalseScope;
} else {
$ifFalseType = $ifFalseScope->getType($expr->else);
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3501
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$rightScope = $scope->filterByFalseyValue($expr);
$rightResult = $this->processExprNode($stmt, $expr->right, $rightScope, $nodeCallback, $context->enterDeep());
$rightExprType = $scope->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$scope = $scope->filterByTruthyValue(new Expr\Isset_([$expr->left]));
} else {
$scope = $scope->filterByTruthyValue(new Expr\Isset_([$expr->left]))->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3474
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$leftResult = $this->processExprNode($stmt, $expr->left, $scope, $nodeCallback, $context->enterDeep());
$rightResult = $this->processExprNode($stmt, $expr->right, $leftResult->getFalseyScope(), $nodeCallback, $context);
$rightExprType = $rightResult->getScope()->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$leftMergedWithRightScope = $leftResult->getTruthyScope();
} else {
$leftMergedWithRightScope = $leftResult->getScope()->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3453
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$leftResult = $this->processExprNode($stmt, $expr->left, $scope, $nodeCallback, $context->enterDeep());
$rightResult = $this->processExprNode($stmt, $expr->right, $leftResult->getTruthyScope(), $nodeCallback, $context);
$rightExprType = $rightResult->getScope()->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$leftMergedWithRightScope = $leftResult->getFalseyScope();
} else {
$leftMergedWithRightScope = $leftResult->getScope()->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3227
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($parametersAcceptor !== null) {
$expr = ArgumentsNormalizer::reorderStaticCallArguments($parametersAcceptor, $expr) ?? $expr;
$returnType = $parametersAcceptor->getReturnType();
- $isAlwaysTerminating = $returnType->isExplicitNever()->yes();
+ $isAlwaysTerminating = !$returnType->isExplicitNever()->no();
}
$result = $this->processArgs($stmt, $methodReflection, null, $parametersAcceptor, $expr, $scope, $nodeCallback, $context, $closureBindScope ?? null);
$scope = $result->getScope();
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3035
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($parametersAcceptor !== null) {
$expr = ArgumentsNormalizer::reorderMethodArguments($parametersAcceptor, $expr) ?? $expr;
$returnType = $parametersAcceptor->getReturnType();
- $isAlwaysTerminating = $returnType->isExplicitNever()->yes();
+ $isAlwaysTerminating = !$returnType->isExplicitNever()->no();
}
$result = $this->processArgs($stmt, $methodReflection, $methodReflection !== null ? $scope->getNakedMethod($calledOnType, $methodReflection->getName()) : null, $parametersAcceptor, $expr, $scope, $nodeCallback, $context);
$scope = $result->getScope();
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1896
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$newThrowPoints = [];
foreach ($throwPoints as $throwPoint) {
$newThrowPoint = $throwPoint->subtractCatchType($originalCatchType);
- if (!$newThrowPoint->getType()->isNever()->no()) {
+ if ($newThrowPoint->getType()->isNever()->yes()) {
continue;
}
$newThrowPoints[] = $newThrowPoint;
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1751
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$prevScope = $branchScope;
}
}
- $exhaustive = $scopeForBranches->getType($stmt->cond)->isNever()->yes();
+ $exhaustive = !$scopeForBranches->getType($stmt->cond)->isNever()->no();
if (!$hasDefaultCase && !$exhaustive) {
$alwaysTerminating = false;
}
|
|
Mutation Testing (8.4, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions', 'build-infection-path']
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3939
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$finalScope = $ifTrueScope;
} elseif ($condType->isFalse()->yes()) {
$finalScope = $ifFalseScope;
- } else if ($ifTrueType !== null && $ifTrueType->isExplicitNever()->yes()) {
+ } else if ($ifTrueType !== null && !$ifTrueType->isExplicitNever()->no()) {
$finalScope = $ifFalseScope;
} else {
$ifFalseType = $ifFalseScope->getType($expr->else);
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3501
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$rightScope = $scope->filterByFalseyValue($expr);
$rightResult = $this->processExprNode($stmt, $expr->right, $rightScope, $nodeCallback, $context->enterDeep());
$rightExprType = $scope->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$scope = $scope->filterByTruthyValue(new Expr\Isset_([$expr->left]));
} else {
$scope = $scope->filterByTruthyValue(new Expr\Isset_([$expr->left]))->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3474
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$leftResult = $this->processExprNode($stmt, $expr->left, $scope, $nodeCallback, $context->enterDeep());
$rightResult = $this->processExprNode($stmt, $expr->right, $leftResult->getFalseyScope(), $nodeCallback, $context);
$rightExprType = $rightResult->getScope()->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$leftMergedWithRightScope = $leftResult->getTruthyScope();
} else {
$leftMergedWithRightScope = $leftResult->getScope()->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3453
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$leftResult = $this->processExprNode($stmt, $expr->left, $scope, $nodeCallback, $context->enterDeep());
$rightResult = $this->processExprNode($stmt, $expr->right, $leftResult->getTruthyScope(), $nodeCallback, $context);
$rightExprType = $rightResult->getScope()->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$leftMergedWithRightScope = $leftResult->getFalseyScope();
} else {
$leftMergedWithRightScope = $leftResult->getScope()->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3227
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($parametersAcceptor !== null) {
$expr = ArgumentsNormalizer::reorderStaticCallArguments($parametersAcceptor, $expr) ?? $expr;
$returnType = $parametersAcceptor->getReturnType();
- $isAlwaysTerminating = $returnType->isExplicitNever()->yes();
+ $isAlwaysTerminating = !$returnType->isExplicitNever()->no();
}
$result = $this->processArgs($stmt, $methodReflection, null, $parametersAcceptor, $expr, $scope, $nodeCallback, $context, $closureBindScope ?? null);
$scope = $result->getScope();
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3035
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($parametersAcceptor !== null) {
$expr = ArgumentsNormalizer::reorderMethodArguments($parametersAcceptor, $expr) ?? $expr;
$returnType = $parametersAcceptor->getReturnType();
- $isAlwaysTerminating = $returnType->isExplicitNever()->yes();
+ $isAlwaysTerminating = !$returnType->isExplicitNever()->no();
}
$result = $this->processArgs($stmt, $methodReflection, $methodReflection !== null ? $scope->getNakedMethod($calledOnType, $methodReflection->getName()) : null, $parametersAcceptor, $expr, $scope, $nodeCallback, $context);
$scope = $result->getScope();
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L2712
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($parametersAcceptor !== null) {
$expr = ArgumentsNormalizer::reorderFuncArguments($parametersAcceptor, $expr) ?? $expr;
$returnType = $parametersAcceptor->getReturnType();
- $isAlwaysTerminating = $isAlwaysTerminating || $returnType->isExplicitNever()->yes();
+ $isAlwaysTerminating = $isAlwaysTerminating || !$returnType->isExplicitNever()->no();
}
if ($expr->name instanceof Name && $functionReflection !== null && $functionReflection->getName() === 'clone' && count($expr->getArgs()) === 2) {
$clonePropertiesArgType = $scope->getType($expr->getArgs()[1]->value);
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L2492
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
return $expr;
}
$exprType = $scope->getType($expr);
- if ($exprType->isExplicitNever()->yes()) {
+ if (!$exprType->isExplicitNever()->no()) {
return $expr;
}
return null;
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1896
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$newThrowPoints = [];
foreach ($throwPoints as $throwPoint) {
$newThrowPoint = $throwPoint->subtractCatchType($originalCatchType);
- if (!$newThrowPoint->getType()->isNever()->no()) {
+ if ($newThrowPoint->getType()->isNever()->yes()) {
continue;
}
$newThrowPoints[] = $newThrowPoint;
|
|
Mutation Testing (8.2, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1751
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$prevScope = $branchScope;
}
}
- $exhaustive = $scopeForBranches->getType($stmt->cond)->isNever()->yes();
+ $exhaustive = !$scopeForBranches->getType($stmt->cond)->isNever()->no();
if (!$hasDefaultCase && !$exhaustive) {
$alwaysTerminating = false;
}
|
|
Mutation Testing (8.2, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions', 'build-infection-path']
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3939
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$finalScope = $ifTrueScope;
} elseif ($condType->isFalse()->yes()) {
$finalScope = $ifFalseScope;
- } else if ($ifTrueType !== null && $ifTrueType->isExplicitNever()->yes()) {
+ } else if ($ifTrueType !== null && !$ifTrueType->isExplicitNever()->no()) {
$finalScope = $ifFalseScope;
} else {
$ifFalseType = $ifFalseScope->getType($expr->else);
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3501
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$rightScope = $scope->filterByFalseyValue($expr);
$rightResult = $this->processExprNode($stmt, $expr->right, $rightScope, $nodeCallback, $context->enterDeep());
$rightExprType = $scope->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$scope = $scope->filterByTruthyValue(new Expr\Isset_([$expr->left]));
} else {
$scope = $scope->filterByTruthyValue(new Expr\Isset_([$expr->left]))->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3474
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$leftResult = $this->processExprNode($stmt, $expr->left, $scope, $nodeCallback, $context->enterDeep());
$rightResult = $this->processExprNode($stmt, $expr->right, $leftResult->getFalseyScope(), $nodeCallback, $context);
$rightExprType = $rightResult->getScope()->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$leftMergedWithRightScope = $leftResult->getTruthyScope();
} else {
$leftMergedWithRightScope = $leftResult->getScope()->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3453
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$leftResult = $this->processExprNode($stmt, $expr->left, $scope, $nodeCallback, $context->enterDeep());
$rightResult = $this->processExprNode($stmt, $expr->right, $leftResult->getTruthyScope(), $nodeCallback, $context);
$rightExprType = $rightResult->getScope()->getType($expr->right);
- if ($rightExprType->isExplicitNever()->yes()) {
+ if (!$rightExprType->isExplicitNever()->no()) {
$leftMergedWithRightScope = $leftResult->getFalseyScope();
} else {
$leftMergedWithRightScope = $leftResult->getScope()->mergeWith($rightResult->getScope());
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3227
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($parametersAcceptor !== null) {
$expr = ArgumentsNormalizer::reorderStaticCallArguments($parametersAcceptor, $expr) ?? $expr;
$returnType = $parametersAcceptor->getReturnType();
- $isAlwaysTerminating = $returnType->isExplicitNever()->yes();
+ $isAlwaysTerminating = !$returnType->isExplicitNever()->no();
}
$result = $this->processArgs($stmt, $methodReflection, null, $parametersAcceptor, $expr, $scope, $nodeCallback, $context, $closureBindScope ?? null);
$scope = $result->getScope();
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L3035
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($parametersAcceptor !== null) {
$expr = ArgumentsNormalizer::reorderMethodArguments($parametersAcceptor, $expr) ?? $expr;
$returnType = $parametersAcceptor->getReturnType();
- $isAlwaysTerminating = $returnType->isExplicitNever()->yes();
+ $isAlwaysTerminating = !$returnType->isExplicitNever()->no();
}
$result = $this->processArgs($stmt, $methodReflection, $methodReflection !== null ? $scope->getNakedMethod($calledOnType, $methodReflection->getName()) : null, $parametersAcceptor, $expr, $scope, $nodeCallback, $context);
$scope = $result->getScope();
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L2712
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if ($parametersAcceptor !== null) {
$expr = ArgumentsNormalizer::reorderFuncArguments($parametersAcceptor, $expr) ?? $expr;
$returnType = $parametersAcceptor->getReturnType();
- $isAlwaysTerminating = $isAlwaysTerminating || $returnType->isExplicitNever()->yes();
+ $isAlwaysTerminating = $isAlwaysTerminating || !$returnType->isExplicitNever()->no();
}
if ($expr->name instanceof Name && $functionReflection !== null && $functionReflection->getName() === 'clone' && count($expr->getArgs()) === 2) {
$clonePropertiesArgType = $scope->getType($expr->getArgs()[1]->value);
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L2492
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
return $expr;
}
$exprType = $scope->getType($expr);
- if ($exprType->isExplicitNever()->yes()) {
+ if (!$exprType->isExplicitNever()->no()) {
return $expr;
}
return null;
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1896
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$newThrowPoints = [];
foreach ($throwPoints as $throwPoint) {
$newThrowPoint = $throwPoint->subtractCatchType($originalCatchType);
- if (!$newThrowPoint->getType()->isNever()->no()) {
+ if ($newThrowPoint->getType()->isNever()->yes()) {
continue;
}
$newThrowPoints[] = $newThrowPoint;
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1751
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$prevScope = $branchScope;
}
}
- $exhaustive = $scopeForBranches->getType($stmt->cond)->isNever()->yes();
+ $exhaustive = !$scopeForBranches->getType($stmt->cond)->isNever()->no();
if (!$hasDefaultCase && !$exhaustive) {
$alwaysTerminating = false;
}
|
|
Mutation Testing (8.3, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions', 'build-infection-path']
|