File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 17
17
use PHPStan \Type \FunctionTypeSpecifyingExtension ;
18
18
use PHPStan \Type \IntersectionType ;
19
19
use PHPStan \Type \ObjectWithoutClassType ;
20
+ use PHPStan \Type \TypeCombinator ;
20
21
use PHPStan \Type \UnionType ;
21
22
use function count ;
22
23
@@ -67,10 +68,10 @@ public function specifyTypes(
67
68
foreach ($ methodNameTypes as $ methodNameType ) {
68
69
$ specifiedTypes = $ specifiedTypes ->unionWith ($ this ->typeSpecifier ->create (
69
70
$ node ->getArgs ()[0 ]->value ,
70
- new IntersectionType ([
71
+ TypeCombinator:: intersect (
71
72
$ objectType ,
72
73
new HasMethodType ($ methodNameType ->getValue ()),
73
- ] ),
74
+ ),
74
75
$ context ,
75
76
$ scope ,
76
77
));
@@ -83,13 +84,13 @@ public function specifyTypes(
83
84
foreach ($ methodNameTypes as $ methodNameType ) {
84
85
$ specifiedTypes = $ specifiedTypes ->unionWith ($ this ->typeSpecifier ->create (
85
86
$ node ->getArgs ()[0 ]->value ,
86
- new UnionType ([
87
- new IntersectionType ([
87
+ TypeCombinator:: union (
88
+ TypeCombinator:: intersect (
88
89
new ObjectWithoutClassType (),
89
90
new HasMethodType ($ methodNameType ->getValue ()),
90
- ] ),
91
+ ),
91
92
new ClassStringType (),
92
- ] ),
93
+ ),
93
94
$ context ,
94
95
$ scope ,
95
96
));
You can’t perform that action at this time.
0 commit comments