/** * @param string $annotation * @return int */ private function getStartLine($annotation) { $doc = $this->classReflection->getDocComment(); $tmp = $annotation; if ($delimiter = strpos($annotation, "\n")) { $tmp = substr($annotation, 0, $delimiter); } return $this->classReflection->getStartLine() + substr_count(substr($doc, 0, strpos($doc, $tmp)), "\n"); }
/** * {@inheritdoc} */ public function getOwnMagicMethods() { if ($this->ownMagicMethods === null) { $this->ownMagicMethods = []; if ($this->classReflection->isVisibilityLevelPublic() && $this->classReflection->getDocComment()) { $extractor = new AnnotationMethodExtractor($this->classReflection->getReflectionFactory()); $this->ownMagicMethods += $extractor->extractFromReflection($this->classReflection); } } return $this->ownMagicMethods; }