public function updateProperty(\ReflectionProperty $reflectionProperty, Schema $property)
    {
        try {
            $docBlock = $this->docBlockFactory->create($reflectionProperty);
        } catch (\Exception $e) {
            // ignore
            return;
        }

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

        if (!$title = $docBlock->getSummary()) {
            /** @var Var_ $var */
            foreach ($docBlock->getTagsByName('var') as $var) {
                if (!$description = $var->getDescription()) {
                    continue;
                }
                $title = $description->render();
                if ($title) {
                    break;
                }
            }
        }
        if (null === $property->getTitle() && $title) {
            $property->setTitle($title);
        }
        if (null === $property->getDescription() && $docBlock->getDescription() && $docBlock->getDescription()->render()) {
            $property->setDescription($docBlock->getDescription()->render());
        }
    }
public function updateProperty ( \ ReflectionProperty $ reflectionProperty , Schema $ property ) { try { $ docBlock = $ this -> docBlockFactory -> create ( $ reflectionProperty ) ; } catch ( \ Exception $ e ) { // ignore return ; } if ( ! $ title = $ docBlock -> getSummary ( ) ) { /** @var Var_ $var */ foreach ( $ docBlock -> getTagsByName ( 'var' ) as $ var ) { if ( ! $ description = $ var -> getDescription ( ) ) { continue ; } $ title = $ description -> render ( ) ; if ( $ title ) { break ; } } } if ( null === $ property -> getTitle ( ) && $ title ) { $ property -> setTitle ( $ title ) ; } if ( null === $ property -> getDescription ( ) && $ docBlock -> getDescription ( ) && $ docBlock -> getDescription ( ) -> render ( ) ) { $ property -> setDescription ( $ docBlock -> getDescription ( ) -> render ( ) ) ; } }
Update the Swagger information with information from the DocBlock comment.
Update the Swagger information with information from the DocBlock comment .