Respect phpstan level in ParameterCastableToNumberRule #25503
Triggered via pull request
February 14, 2026 17:52
Status
Failure
Total duration
12m 57s
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
3 errors and 4 warnings
|
Integration tests (ubuntu-latest)
Process completed with exit code 2.
|
|
Mutation Testing (8.3, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.4, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Rules/ParameterCastableToStringCheck.php#L42
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$scope,
$parameter->value,
'',
- static fn (Type $type): bool => $type->isArray()->yes(),
+ static fn (Type $type): bool => !$type->isArray()->no(),
);
$arrayType = $arrayTypeResult->getType();
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Rules/Functions/ParameterCastableToNumberRule.php#L73
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$castFn = $this->phpVersion->supportsObjectsInArraySumProduct()
? static fn (Type $t) => $t->toNumber()
- : static fn (Type $t) => !$t instanceof MixedType && !$t->isObject()->no() ? new ErrorType() : $t->toNumber();
+ : static fn (Type $t) => !$t instanceof MixedType && $t->isObject()->yes() ? new ErrorType() : $t->toNumber();
$error = $this->parameterCastableToStringCheck->checkParameter(
$origArgs[0],
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Rules/ParameterCastableToStringCheck.php#L42
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$scope,
$parameter->value,
'',
- static fn (Type $type): bool => $type->isArray()->yes(),
+ static fn (Type $type): bool => !$type->isArray()->no(),
);
$arrayType = $arrayTypeResult->getType();
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Rules/Functions/ParameterCastableToNumberRule.php#L73
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$castFn = $this->phpVersion->supportsObjectsInArraySumProduct()
? static fn (Type $t) => $t->toNumber()
- : static fn (Type $t) => !$t instanceof MixedType && !$t->isObject()->no() ? new ErrorType() : $t->toNumber();
+ : static fn (Type $t) => !$t instanceof MixedType && $t->isObject()->yes() ? new ErrorType() : $t->toNumber();
$error = $this->parameterCastableToStringCheck->checkParameter(
$origArgs[0],
|