Fix invokable objects incorrectly labeled as instances of Closure
#25081
tests.yml
on: pull_request
Matrix: Tests PHPUnit 12.x
Determine levels tests matrix
34s
Matrix: Integration tests
Matrix: Tests PHPUnit 11.x
Matrix: Tests with old PHPUnit
Matrix: Mutation Testing
Matrix: Levels tests
Annotations
2 errors and 2 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/Accessory/HasMethodType.php#L90
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (
$this->isCallable()->yes()
- && $otherType->isCallable()->yes()
+ && !$otherType->isCallable()->no()
&& !(new ObjectType(Closure::class))->isSuperTypeOf($otherType)->yes()
) {
return IsSuperTypeOfResult::createYes();
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Type/Accessory/HasMethodType.php#L90
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (
$this->isCallable()->yes()
- && $otherType->isCallable()->yes()
+ && !$otherType->isCallable()->no()
&& !(new ObjectType(Closure::class))->isSuperTypeOf($otherType)->yes()
) {
return IsSuperTypeOfResult::createYes();
|