public function getReference($trimmed = false)
    {
        if ($this->reference === null) {
            $referenceComment = $this->getReferenceComment();
            $referenceComment = preg_replace('/\.$/', '', $referenceComment);

            if (preg_match('/^\s*Styleguide\s+(.*)/i', $referenceComment, $matches)) {
                $this->reference = trim($matches[1]);
            }
        }

        return ($trimmed && $this->reference !== null)
            ? self::trimReference($this->reference)
            : $this->reference;
    }