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 1717use PHPStan \Type \FunctionTypeSpecifyingExtension ;
1818use PHPStan \Type \IntersectionType ;
1919use PHPStan \Type \ObjectWithoutClassType ;
20+ use PHPStan \Type \TypeCombinator ;
2021use PHPStan \Type \UnionType ;
2122use function count ;
2223
@@ -67,10 +68,10 @@ public function specifyTypes(
6768 foreach ($ methodNameTypes as $ methodNameType ) {
6869 $ specifiedTypes = $ specifiedTypes ->unionWith ($ this ->typeSpecifier ->create (
6970 $ node ->getArgs ()[0 ]->value ,
70- new IntersectionType ([
71+ TypeCombinator:: intersect (
7172 $ objectType ,
7273 new HasMethodType ($ methodNameType ->getValue ()),
73- ] ),
74+ ),
7475 $ context ,
7576 $ scope ,
7677 ));
@@ -83,13 +84,13 @@ public function specifyTypes(
8384 foreach ($ methodNameTypes as $ methodNameType ) {
8485 $ specifiedTypes = $ specifiedTypes ->unionWith ($ this ->typeSpecifier ->create (
8586 $ node ->getArgs ()[0 ]->value ,
86- new UnionType ([
87- new IntersectionType ([
87+ TypeCombinator:: union (
88+ TypeCombinator:: intersect (
8889 new ObjectWithoutClassType (),
8990 new HasMethodType ($ methodNameType ->getValue ()),
90- ] ),
91+ ),
9192 new ClassStringType (),
92- ] ),
93+ ),
9394 $ context ,
9495 $ scope ,
9596 ));
You can’t perform that action at this time.
0 commit comments