ApiGen\Parser\Reflection\ReflectionProperty::getTypeHint PHP Метод

getTypeHint() публичный метод

public getTypeHint ( )
    public function getTypeHint()
    {
        if ($annotations = $this->getAnnotation('var')) {
            list($types) = preg_split('~\\s+|$~', $annotations[0], 2);
            if (!empty($types) && $types[0] !== '$') {
                return $types;
            }
        }
        try {
            $type = gettype($this->getDefaultValue());
            if (strtolower($type) !== 'null') {
                return $type;
            }
        } catch (\Exception $e) {
            return;
        }
    }