is(Invader::class)) { return false; } $invaded = $classReflection->getActiveTemplateTypeMap()->getType('T') ?? throw new ShouldNotHappenException(); return $invaded->hasProperty($propertyName)->yes(); } public function getProperty(ClassReflection $classReflection, string $propertyName): PropertyReflection { $invaded = $classReflection->getActiveTemplateTypeMap()->getType('T') ?? throw new ShouldNotHappenException(); return new InvadedPropertyReflection( $invaded->getProperty($propertyName, new OutOfClassScope()), ); } }