private static function trimDesc($desc)
    {
        $lines = \explode("\n", $desc);
        $leadingSpaces = array();
        foreach ($lines as $line) {
            if (\strlen($line)) {
                $leadingSpaces[] = \strspn($line, ' ');
            }
        }
        \array_shift($leadingSpaces);    // first line will always have zero leading spaces
        $trimLen = $leadingSpaces
            ? \min($leadingSpaces)
            : 0;
        if (!$trimLen) {
            return $desc;
        }
        foreach ($lines as $i => $line) {
            $lines[$i] = $i > 0 && \strlen($line)
                ? \substr($line, $trimLen)
                : $line;
        }
        $desc = \implode("\n", $lines);
        return $desc;
    }