Skip to content

Commit 34fe9f6

Browse files
committed
Make note of why we need to check property tags
1 parent cae4eb1 commit 34fe9f6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Reflection/EntityFieldsViaMagicReflectionExtension.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class EntityFieldsViaMagicReflectionExtension implements PropertiesClassReflecti
2020

2121
public function hasProperty(ClassReflection $classReflection, string $propertyName): bool
2222
{
23+
// @todo Have this run after PHPStan\Reflection\Annotations\AnnotationsPropertiesClassReflectionExtension
24+
// We should not have to check for the property tags if we could get this to run after PHPStan's
25+
// existing annotation property reflection.
2326
if ($classReflection->hasNativeProperty($propertyName) || array_key_exists($propertyName, $classReflection->getPropertyTags())) {
2427
// Let other parts of PHPStan handle this.
2528
return false;
@@ -57,8 +60,7 @@ public function getProperty(ClassReflection $classReflection, string $propertyNa
5760
protected static function classObjectIsSuperOfFieldItemList(\ReflectionClass $reflection) : TrinaryLogic
5861
{
5962
$classObject = new ObjectType($reflection->getName());
60-
$interfaceObject = self::getFieldItemListInterfaceObject();
61-
return $interfaceObject->isSuperTypeOf($classObject);
63+
return self::getFieldItemListInterfaceObject()->isSuperTypeOf($classObject);
6264
}
6365

6466
protected static function getFieldItemListInterfaceObject() : ObjectType

0 commit comments

Comments
 (0)