public function hasProperty(ClassReflection $classReflection, string $propertyName) : bool
{
$traitNames = $this->getTraitNames($classReflection->getNativeReflection());
if (!in_array(\Nette\SmartObject::class, $traitNames, true)) {
return false;
}
$property = \Nette\Utils\ObjectMixin::getMagicProperty($classReflection->getName(), $propertyName);
if ($property === null) {
return false;
}
$getterMethod = $this->getMethodByProperty($classReflection, $propertyName);
if ($getterMethod === null) {
return false;
}
return $getterMethod->isPublic();
}