docBlockFactory = $docBlockFactory; } /** * @param \ReflectionProperty $reflectionProperty * @param Items|Schema $property */ public function updateWithPhpdoc(\ReflectionProperty $reflectionProperty, $property) { try { $docBlock = $this->docBlockFactory->create($reflectionProperty); if (!$title = $docBlock->getSummary()) { /** @var Var_ $var */ foreach ($docBlock->getTagsByName('var') as $var) { if (null === $description = $var->getDescription()) continue; $title = $description->render(); if ($title) break; } } if ($property->getTitle() === null && $title) { $property->setTitle($title); } if ($property->getDescription() === null && $docBlock->getDescription()) { $property->setDescription($docBlock->getDescription()->render()); } } catch (\Exception $e) { // ignore } } }