/** * @param ClassReflectionInterface $reflectionClass * @param bool $isDocumented * @param array $methods * @return MagicMethodReflectionInterface[] */ private function extractOwnFromClass(ClassReflectionInterface $reflectionClass, $isDocumented, array $methods) { foreach ($reflectionClass->getOwnMagicMethods() as $method) { if ($this->canBeExtracted($isDocumented, $methods, $method)) { $methods[$method->getName()] = $method; } } return $methods; }