/** * @param string $value * @param ElementReflectionInterface $reflectionElement * @return string */ private function processUsesAndUsedbyAnnotations($value, ElementReflectionInterface $reflectionElement) { list($link, $description) = Strings::split($value); $separator = $reflectionElement instanceof ClassReflectionInterface || !$description ? ' ' : '<br>'; if ($this->elementResolver->resolveElement($link, $reflectionElement) !== null) { $value = $this->typeLinks($link, $reflectionElement) . $separator . $description; return trim($value); } return null; }
private function loadUsesToReferencedElementUsedby(ElementReflectionInterface $element) { $uses = $element->getAnnotation('uses'); if ($uses === null) { return; } foreach ($uses as $value) { list($link, $description) = preg_split('~\\s+|$~', $value, 2); $resolved = $this->elementResolver->resolveElement($link, $element); if ($resolved) { $resolved->addAnnotation('usedby', $element->getPrettyName() . ' ' . $description); } } }