@@ -158,7 +158,7 @@ public function accepts(Type $type, bool $strictTypes): AcceptsResult
158
158
$ result = AcceptsResult::createYes ();
159
159
$ scope = new OutOfClassScope ();
160
160
foreach ($ this ->properties as $ propertyName => $ propertyType ) {
161
- $ typeHasProperty = $ type ->hasProperty ($ propertyName );
161
+ $ typeHasProperty = $ type ->hasInstanceProperty ($ propertyName );
162
162
$ hasProperty = new AcceptsResult (
163
163
$ typeHasProperty ,
164
164
$ typeHasProperty ->yes () ? [] : [
@@ -183,7 +183,7 @@ public function accepts(Type $type, bool $strictTypes): AcceptsResult
183
183
$ result = $ result ->and ($ hasProperty );
184
184
185
185
try {
186
- $ otherProperty = $ type ->getProperty ($ propertyName , $ scope );
186
+ $ otherProperty = $ type ->getInstanceProperty ($ propertyName , $ scope );
187
187
} catch (MissingPropertyFromReflectionException ) {
188
188
return new AcceptsResult (
189
189
$ result ->result ,
@@ -270,7 +270,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
270
270
$ result = IsSuperTypeOfResult::createYes ();
271
271
$ scope = new OutOfClassScope ();
272
272
foreach ($ this ->properties as $ propertyName => $ propertyType ) {
273
- $ hasProperty = new IsSuperTypeOfResult ($ type ->hasProperty ($ propertyName ), []);
273
+ $ hasProperty = new IsSuperTypeOfResult ($ type ->hasInstanceProperty ($ propertyName ), []);
274
274
if ($ hasProperty ->no ()) {
275
275
if (in_array ($ propertyName , $ this ->optionalProperties , true )) {
276
276
continue ;
@@ -284,7 +284,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
284
284
$ result = $ result ->and ($ hasProperty );
285
285
286
286
try {
287
- $ otherProperty = $ type ->getProperty ($ propertyName , $ scope );
287
+ $ otherProperty = $ type ->getInstanceProperty ($ propertyName , $ scope );
288
288
} catch (MissingPropertyFromReflectionException ) {
289
289
return $ result ;
290
290
}
@@ -381,12 +381,12 @@ public function inferTemplateTypes(Type $receivedType): TemplateTypeMap
381
381
$ typeMap = TemplateTypeMap::createEmpty ();
382
382
$ scope = new OutOfClassScope ();
383
383
foreach ($ this ->properties as $ name => $ propertyType ) {
384
- if ($ receivedType ->hasProperty ($ name )->no ()) {
384
+ if ($ receivedType ->hasInstanceProperty ($ name )->no ()) {
385
385
continue ;
386
386
}
387
387
388
388
try {
389
- $ receivedProperty = $ receivedType ->getProperty ($ name , $ scope );
389
+ $ receivedProperty = $ receivedType ->getInstanceProperty ($ name , $ scope );
390
390
} catch (MissingPropertyFromReflectionException ) {
391
391
continue ;
392
392
}
@@ -477,10 +477,10 @@ public function traverseSimultaneously(Type $right, callable $cb): Type
477
477
478
478
$ scope = new OutOfClassScope ();
479
479
foreach ($ this ->properties as $ name => $ propertyType ) {
480
- if (!$ right ->hasProperty ($ name )->yes ()) {
480
+ if (!$ right ->hasInstanceProperty ($ name )->yes ()) {
481
481
return $ this ;
482
482
}
483
- $ transformed = $ cb ($ propertyType , $ right ->getProperty ($ name , $ scope )->getReadableType ());
483
+ $ transformed = $ cb ($ propertyType , $ right ->getInstanceProperty ($ name , $ scope )->getReadableType ());
484
484
if ($ transformed !== $ propertyType ) {
485
485
$ stillOriginal = false ;
486
486
}
0 commit comments