/** * @return ReflectionMethod[]|array */ public function getTraitMethods() { $methods = []; foreach ($this->originalReflection->getTraitMethods($this->reflectionClass->getVisibilityLevel()) as $method) { $apiMethod = $this->reflectionClass->getReflectionFactory()->createFromReflection($method); if (!$this->reflectionClass->isDocumented() || $apiMethod->isDocumented()) { /** @var ReflectionMethod $method */ $methods[$method->getName()] = $apiMethod; } } return $methods; }