mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Don't add link if the issue doesn't have a shortcode (#4786)
This commit is contained in:
parent
7a217a060d
commit
37f0cd6263
@ -162,7 +162,7 @@ class IssueData
|
||||
$this->column_to = $column_to;
|
||||
$this->shortcode = $shortcode;
|
||||
$this->error_level = $error_level;
|
||||
$this->link = 'https://psalm.dev/' . \str_pad((string) $shortcode, 3, "0", \STR_PAD_LEFT);
|
||||
$this->link = $shortcode ? 'https://psalm.dev/' . \str_pad((string) $shortcode, 3, "0", \STR_PAD_LEFT) : '';
|
||||
$this->taint_trace = $taint_trace;
|
||||
$this->dupe_key = $dupe_key;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class ConsoleReport extends Report
|
||||
$issue_string .= 'INFO';
|
||||
}
|
||||
|
||||
$issue_reference = ' (see ' . $issue_data->link . ')';
|
||||
$issue_reference = $issue_data->link ? ' (see ' . $issue_data->link . ')' : '';
|
||||
|
||||
$issue_string .= ': ' . $issue_data->type
|
||||
. ' - ' . $issue_data->file_name . ':' . $issue_data->line_from . ':' . $issue_data->column_from
|
||||
|
@ -30,7 +30,7 @@ class PhpStormReport extends Report
|
||||
$issue_string .= 'INFO';
|
||||
}
|
||||
|
||||
$issue_reference = ' (see ' . $issue_data->link . ')';
|
||||
$issue_reference = $issue_data->link ? ' (see ' . $issue_data->link . ')' : '';
|
||||
|
||||
$issue_string .= ': ' . $issue_data->type
|
||||
. "\nat " . $issue_data->file_path . ':' . $issue_data->line_from . ':' . $issue_data->column_from
|
||||
|
Loading…
Reference in New Issue
Block a user