Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * {@inheritDoc}
- */
- public function getClassAnnotations(ReflectionClass $class)
- {
- $this->parser->setTarget(Target::TARGET_CLASS);
- $this->parser->setImports($this->getClassImports($class));
- $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
- $annotations = $this->parser->parse($class->getDocComment(), 'class ' . $class->getName());
- if (!method_exists($class, 'getTraits')) {
- return $annotations;
- }
- foreach (class_uses($class->getName()) as $traitClassName) {
- $annotations = array_merge($annotations, $this->getClassAnnotations(new \ReflectionClass($traitClassName)));
- }
- return $annotations;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement