/** * Returns the method declaring trait. * * @return \ApiGen\Reflection\ReflectionClass|null */ public function getDeclaringTrait() { return $this->declaringClass->isTrait() ? $this->declaringClass : null; }
/** * @return string */ private function getTypeByReflection(ReflectionClass $reflection) { if ($reflection->isInterface()) { return Elements::INTERFACES; } elseif ($reflection->isTrait()) { return Elements::TRAITS; } elseif ($reflection->isException()) { return Elements::EXCEPTIONS; } else { return Elements::CLASSES; } }