コード例 #1
0
 /**
  * Returns the method declaring trait.
  *
  * @return \ApiGen\Reflection\ReflectionClass|null
  */
 public function getDeclaringTrait()
 {
     return $this->declaringClass->isTrait() ? $this->declaringClass : null;
 }
コード例 #2
0
 /**
  * @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;
     }
 }