public static function createReflection(ReflectionClass $reflection) { $result = new ClassServiceReflection($reflection->getName(), self::getDescriptionBlock($reflection->getDocComment())); $methods = $reflection->getMethods(); foreach ($methods as $method) { if (!$method->isPublic()) { continue; } $result->addMethod(MethodServiceReflection::createReflection($method)); } return $result; }