protected function getMethodComment(\ReflectionMethod $method)
    {
        $lines = preg_split("/((\r?\n)|(\r\n?))/", $method->getDocComment());
        $count = count($lines);
        foreach ($lines as $i => $line) {
            $line = preg_replace('/^\s*(\/\*\*|\*\/?)\s*/', '', $line);
            $line = trim($line);
            $lines[$i] = $line;
            if (!$line && ($i == 0 || $i == $count - 1)) { // If first or last lines are blank
                unset($lines[$i]);
            }
        }

        return array_values($lines);

    }