protected static function cleanLeadingSpace($text)
    {
        $i = 0;

        while (! $firstLine = explode("\n", $text)[$i]) {
            $i ++;
        }

        preg_match('/^( *)/', $firstLine, $matches);

        return preg_replace('/^[ ]{'.strlen($matches[1]).'}/m', '', $text);
    }