File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
src/Type/Doctrine/QueryBuilder Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 3
3
namespace PHPStan \Type \Doctrine \QueryBuilder ;
4
4
5
5
use PhpParser \Node \Expr \MethodCall ;
6
- use PHPStan \TrinaryLogic ;
7
6
use PHPStan \Type \ObjectType ;
8
- use PHPStan \Type \Type ;
9
7
10
8
class QueryBuilderType extends ObjectType
11
9
{
12
10
13
11
/** @var MethodCall[] */
14
12
private $ methodCalls = [];
15
13
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
-
39
14
/**
40
15
* @return MethodCall[]
41
16
*/
You can’t perform that action at this time.
0 commit comments