src/Neutrino/Cli/Output/Helper.php
public static function getTaskInfos($class, $methodName)
    {
        $infos = [];
        $reflection = self::getReflection($class);

        try {
            $method = $reflection->getMethod($methodName);
        } catch (\Exception $e) {
            return ['__exception' => "Methods $class::$methodName not found."];
        }

        if (!empty($method)) {
            $docBlock = $method->getDocComment();

            preg_match_all('/\*\s*@(\w+)(.*)/', $docBlock, $annotations);
            $docBlock = preg_replace('/\*\s*@(\w+)(.*)/', '', $docBlock);

            foreach ($annotations[1] as $k => $annotation) {
                switch ($annotation) {
                    case 'description':
                        $infos['description'] = trim($annotations[2][$k]);
                        break;
                    case 'argument':
                    case 'option':
                        $infos[$annotation . 's'][] = trim($annotations[2][$k]);
                        break;
                }
            }

            if (empty($infos['description'])) {
                preg_match_all('/\*([^\n\r]+)/', $docBlock, $lines);

                $rows = [];
                foreach ($lines[1] as $line) {
                    if ($line == '*' || $line == '/') {
                        continue;
                    }
                    $rows[] = preg_replace('/^ /', '', rtrim($line));
                }

                $infos['description'] = implode(PHP_EOL, $rows);
            }
        }

        return $infos;
    }
public static function getTaskInfos($class, $methodName)
    {
        $infos = [];
        $reflection = self::getReflection($class);

        try {
            $method = $reflection->getMethod($methodName);
        } catch (\Exception $e) {
            return ['__exception' => "Methods $class::$methodName not found."];
        }

        if (!empty($method)) {
            $docBlock = $method->getDocComment();

            preg_match_all('/\*\s*@(\w+)(.*)/', $docBlock, $annotations);
            $docBlock = preg_replace('/\*\s*@(\w+)(.*)/', '', $docBlock);

            foreach ($annotations[1] as $k => $annotation) {
                switch ($annotation) {
                    case 'description':
                        $infos['description'] = trim($annotations[2][$k]);
                        break;
                    case 'argument':
                    case 'option':
                        $infos[$annotation . 's'][] = trim($annotations[2][$k]);
                        break;
                }
            }

            if (empty($infos['description'])) {
                preg_match_all('/\*([^\n\r]+)/', $docBlock, $lines);

                $rows = [];
                foreach ($lines[1] as $line) {
                    if ($line == '*' || $line == '/') {
                        continue;
                    }
                    $rows[] = preg_replace('/^ /', '', rtrim($line));
                }

                $infos['description'] = implode(PHP_EOL, $rows);
            }
        }

        return $infos;
    }
@param $class
@param $methodName

@return array