Fix GMP::toNumber #25256
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 6 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/ObjectType.php#L757
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
{
if (
$this->isInstanceOf('SimpleXMLElement')->yes()
- || $this->isInstanceOf('GMP')->yes()
+ || !$this->isInstanceOf('GMP')->no()
) {
return new UnionType([
new FloatType(),
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Type/ObjectType.php#L756
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
public function toNumber(): Type
{
if (
- $this->isInstanceOf('SimpleXMLElement')->yes()
+ !$this->isInstanceOf('SimpleXMLElement')->no()
|| $this->isInstanceOf('GMP')->yes()
) {
return new UnionType([
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Rules/Functions/ParameterCastableToNumberRule.php#L72
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$castFn = $this->phpVersion->supportsObjectsInArraySumProduct()
? static fn (Type $t) => $t->toNumber()
- : static fn (Type $t) => !$t->isObject()->no() ? new ErrorType() : $t->toNumber();
+ : static fn (Type $t) => $t->isObject()->yes() ? new ErrorType() : $t->toNumber();
$error = $this->parameterCastableToStringCheck->checkParameter(
$origArgs[0],
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Type/ObjectType.php#L757
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
{
if (
$this->isInstanceOf('SimpleXMLElement')->yes()
- || $this->isInstanceOf('GMP')->yes()
+ || !$this->isInstanceOf('GMP')->no()
) {
return new UnionType([
new FloatType(),
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Type/ObjectType.php#L756
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
public function toNumber(): Type
{
if (
- $this->isInstanceOf('SimpleXMLElement')->yes()
+ !$this->isInstanceOf('SimpleXMLElement')->no()
|| $this->isInstanceOf('GMP')->yes()
) {
return new UnionType([
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Rules/Functions/ParameterCastableToNumberRule.php#L72
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$castFn = $this->phpVersion->supportsObjectsInArraySumProduct()
? static fn (Type $t) => $t->toNumber()
- : static fn (Type $t) => !$t->isObject()->no() ? new ErrorType() : $t->toNumber();
+ : static fn (Type $t) => $t->isObject()->yes() ? new ErrorType() : $t->toNumber();
$error = $this->parameterCastableToStringCheck->checkParameter(
$origArgs[0],
|