Skip to content

Commit 2308579

Browse files
committed
isSuperTypeOf() returns IsSuperTypeOfResult
1 parent 91239bd commit 2308579

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/DoctrineReflection/DoctrineResultObjectType.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Doctrine\DBAL\Result;
88
use PHPStan\ShouldNotHappenException;
99
use PHPStan\TrinaryLogic;
10+
use PHPStan\Type\IsSuperTypeOfResult;
1011
use PHPStan\Type\ObjectType;
1112
use PHPStan\Type\Type;
1213

@@ -51,10 +52,10 @@ public function equals(Type $type): bool
5152
return parent::equals($type);
5253
}
5354

54-
public function isSuperTypeOf(Type $type): TrinaryLogic
55+
public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
5556
{
5657
if ($type instanceof self) {
57-
return TrinaryLogic::createFromBoolean(
58+
return IsSuperTypeOfResult::createFromBoolean(
5859
$type->rowType !== null
5960
&& $this->rowType !== null
6061
&& $type->rowType->equals($this->rowType)

src/DoctrineReflection/DoctrineStatementObjectType.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Doctrine\DBAL\Statement;
88
use PHPStan\ShouldNotHappenException;
99
use PHPStan\TrinaryLogic;
10+
use PHPStan\Type\IsSuperTypeOfResult;
1011
use PHPStan\Type\ObjectType;
1112
use PHPStan\Type\Type;
1213

@@ -51,10 +52,10 @@ public function equals(Type $type): bool
5152
return parent::equals($type);
5253
}
5354

54-
public function isSuperTypeOf(Type $type): TrinaryLogic
55+
public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
5556
{
5657
if ($type instanceof self) {
57-
return TrinaryLogic::createFromBoolean(
58+
return IsSuperTypeOfResult::createFromBoolean(
5859
$type->rowType !== null
5960
&& $this->rowType !== null
6061
&& $type->rowType->equals($this->rowType)

0 commit comments

Comments
 (0)