public function getPropertyTypes(\ReflectionProperty $property) : array
    {
        $docComment = $property->getDocComment();

        if ($docComment === false) {
            return [];
        }

        if (preg_match('/@var\s+(\S+)/', $docComment, $matches) !== 1) {
            return [];
        }

        return explode('|', $matches[1]);
    }
public function getPropertyTypes(\ReflectionProperty $property) : array
    {
        $docComment = $property->getDocComment();

        if ($docComment === false) {
            return [];
        }

        if (preg_match('/@var\s+(\S+)/', $docComment, $matches) !== 1) {
            return [];
        }

        return explode('|', $matches[1]);
    }
public function getPropertyTypes ( \ ReflectionProperty $ property ) : array { $ docComment = $ property -> getDocComment ( ) ; if ( $ docComment === false ) { return [ ] ; } if ( preg_match ( '/@var\s+(\S+)/' , $ docComment , $ matches ) !== 1 ) { return [ ] ; } return explode ( '|' , $ matches [ 1 ] ) ; }
Returns the types documented on a property.

@param \ReflectionProperty $property

@return array
Returns the types documented on a property .