/** * {@inheritdoc} */ public function extractFromClass(ClassReflectionInterface $reflectionClass) { $methods = []; if ($parentClass = $reflectionClass->getParentClass()) { $methods += $this->extractFromParentClass($parentClass, $reflectionClass->isDocumented()); } if ($traits = $reflectionClass->getTraits()) { $methods += $this->extractFromTraits($traits, $reflectionClass->isDocumented()); } return $methods; }
/** * {@inheritdoc} */ public function getTraitMethods() { $methods = []; foreach ($this->originalReflection->getTraitMethods($this->classReflection->getVisibilityLevel()) as $method) { $apiMethod = $this->classReflection->getReflectionFactory()->createFromReflection($method); if (!$this->classReflection->isDocumented() || $apiMethod->isDocumented()) { $methods[$method->getName()] = $apiMethod; } } return $methods; }
/** * @return bool */ private function canBeProcessed(ClassReflectionInterface $reflection) { if (!$reflection->isMain()) { return false; } if (!$reflection->isDocumented()) { return false; } if (isset($this->processed[$reflection->getName()])) { return false; } return true; }
/** * @param ClassReflectionInterface $class * @param string $name * @return bool */ private function isAllowedIndirectImplementer(ClassReflectionInterface $class, $name) { if ($class->isDocumented() && $class->implementsInterface($name) && !in_array($name, $class->getOwnInterfaceNames())) { return true; } return false; }