Skip to content

Commit 45b9a89

Browse files
committed
Simplified code
1 parent e40d82c commit 45b9a89

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/Type/Doctrine/QueryBuilder/QueryBuilderType.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,14 @@
33
namespace PHPStan\Type\Doctrine\QueryBuilder;
44

55
use PhpParser\Node\Expr\MethodCall;
6-
use PHPStan\TrinaryLogic;
76
use PHPStan\Type\ObjectType;
8-
use PHPStan\Type\Type;
97

108
class QueryBuilderType extends ObjectType
119
{
1210

1311
/** @var MethodCall[] */
1412
private $methodCalls = [];
1513

16-
public function __construct(string $queryBuilderClass)
17-
{
18-
parent::__construct($queryBuilderClass);
19-
}
20-
21-
public function isSuperTypeOf(Type $type): TrinaryLogic
22-
{
23-
if ($type instanceof self) {
24-
if (count($this->methodCalls) > count($type->methodCalls)) {
25-
return TrinaryLogic::createMaybe();
26-
}
27-
28-
return TrinaryLogic::createYes();
29-
}
30-
31-
// todo taky musí fungovat type-specifying extension, tedy intersect
32-
// intersect s více metodami musí vyhrát
33-
// kombinovat pouze QB vycházející ze stejného řádku
34-
// kombinovat pouze QB typy které se nevětví - udržovat si nějaký identifikátor pokaždé?
35-
36-
return parent::isSuperTypeOf($type);
37-
}
38-
3914
/**
4015
* @return MethodCall[]
4116
*/

0 commit comments

Comments
 (0)