Phan\Output\Printer\PylintPrinter::get_severity_code PHP Method

get_severity_code() public static method

public static get_severity_code ( Phan\IssueInstance $instance ) : string
$instance Phan\IssueInstance
return string
    public static function get_severity_code(IssueInstance $instance) : string
    {
        $issue = $instance->getIssue();
        $categoryId = $issue->getTypeId();
        switch ($issue->getSeverity()) {
            case Issue::SEVERITY_LOW:
                return 'C' . $categoryId;
            case Issue::SEVERITY_NORMAL:
                return 'W' . $categoryId;
            case Issue::SEVERITY_CRITICAL:
                return 'E' . $categoryId;
        }
    }