private function getPropCommentInfo(\ReflectionProperty $reflectionProperty)
    {
        $name = $reflectionProperty->name;
        $phpDoc = $this->phpDoc->getParsed($reflectionProperty);
        $info = array(
            'type' => null,
            'desc' => $phpDoc['summary']
                ? $phpDoc['summary']
                : null,
        );
        if (isset($phpDoc['var'])) {
            if (\count($phpDoc['var']) == 1) {
                $var = $phpDoc['var'][0];
            } else {
                /*
                    php's getDocComment doesn't play nice with compound statements
                    https://www.phpdoc.org/docs/latest/references/phpdoc/tags/var.html
                */
                foreach ($phpDoc['var'] as $var) {
                    if ($var['name'] == $name) {
                        break;
                    }
                }
            }
            $info['type'] = $var['type'];
            if (!$info['desc']) {
                $info['desc'] = $var['desc'];
            } elseif ($var['desc']) {
                $info['desc'] = $info['desc'].': '.$var['desc'];
            }
        }
        return $info;
    }
private function getPropCommentInfo(\ReflectionProperty $reflectionProperty)
    {
        $name = $reflectionProperty->name;
        $phpDoc = $this->phpDoc->getParsed($reflectionProperty);
        $info = array(
            'type' => null,
            'desc' => $phpDoc['summary']
                ? $phpDoc['summary']
                : null,
        );
        if (isset($phpDoc['var'])) {
            if (\count($phpDoc['var']) == 1) {
                $var = $phpDoc['var'][0];
            } else {
                /*
                    php's getDocComment doesn't play nice with compound statements
                    https://www.phpdoc.org/docs/latest/references/phpdoc/tags/var.html
                */
                foreach ($phpDoc['var'] as $var) {
                    if ($var['name'] == $name) {
                        break;
                    }
                }
            }
            $info['type'] = $var['type'];
            if (!$info['desc']) {
                $info['desc'] = $var['desc'];
            } elseif ($var['desc']) {
                $info['desc'] = $info['desc'].': '.$var['desc'];
            }
        }
        return $info;
    }
private function getPropCommentInfo ( \ ReflectionProperty $ reflectionProperty ) { $ name = $ reflectionProperty -> name ; $ phpDoc = $ this -> phpDoc -> getParsed ( $ reflectionProperty ) ; $ info = array ( 'type' => null , 'desc' => $ phpDoc [ 'summary' ] ? $ phpDoc [ 'summary' ] : null , ) ; if ( isset ( $ phpDoc [ 'var' ] ) ) { if ( \ count ( $ phpDoc [ 'var' ] ) == 1 ) { $ var = $ phpDoc [ 'var' ] [ 0 ] ; } else { /*
                    php's getDocComment doesn't play nice with compound statements
                    https://www.phpdoc.org/docs/latest/references/phpdoc/tags/var.html
                */ foreach ( $ phpDoc [ 'var' ] as $ var ) { if ( $ var [ 'name' ] == $ name ) { break ; } } } $ info [ 'type' ] = $ var [ 'type' ] ; if ( ! $ info [ 'desc' ] ) { $ info [ 'desc' ] = $ var [ 'desc' ] ; } elseif ( $ var [ 'desc' ] ) { $ info [ 'desc' ] = $ info [ 'desc' ] . ': ' . $ var [ 'desc' ] ; } } return $ info ; }
Get property type and description from phpDoc comment

@param \ReflectionProperty $reflectionProperty reflection property object

@return array
Get property type and description from phpDoc comment