2020-02-17 00:24:40 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Psalm\Internal\Analyzer;
|
|
|
|
|
|
|
|
class IssueData
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public $severity;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $line_from;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $line_to;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $type;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $message;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $file_name;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $file_path;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $snippet;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $selected_text;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $from;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $to;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $snippet_from;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $snippet_to;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $column_from;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $column_to;
|
|
|
|
|
2020-02-17 22:32:16 +01:00
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
public $error_level;
|
|
|
|
|
2020-04-17 06:47:18 +02:00
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $shortcode;
|
|
|
|
|
2020-03-19 21:22:43 +01:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @readonly
|
|
|
|
*/
|
|
|
|
public $link;
|
|
|
|
|
2020-06-30 19:17:51 +02:00
|
|
|
/**
|
2020-10-13 22:49:03 +02:00
|
|
|
* @var ?list<DataFlowNodeData|array{label: string, entry_path_type: string}>
|
2020-06-30 19:17:51 +02:00
|
|
|
*/
|
|
|
|
public $taint_trace;
|
|
|
|
|
2020-09-11 04:44:35 +02:00
|
|
|
/**
|
|
|
|
* @var ?string
|
|
|
|
* @readonly
|
|
|
|
*/
|
2020-10-13 00:39:11 +02:00
|
|
|
public $dupe_key;
|
2020-09-11 04:44:35 +02:00
|
|
|
|
2020-02-17 00:24:40 +01:00
|
|
|
/**
|
2020-10-13 22:49:03 +02:00
|
|
|
* @param ?list<DataFlowNodeData|array{label: string, entry_path_type: string}> $taint_trace
|
2020-02-17 00:24:40 +01:00
|
|
|
*/
|
|
|
|
public function __construct(
|
2020-09-07 01:36:47 +02:00
|
|
|
string $severity,
|
|
|
|
int $line_from,
|
|
|
|
int $line_to,
|
|
|
|
string $type,
|
|
|
|
string $message,
|
|
|
|
string $file_name,
|
|
|
|
string $file_path,
|
|
|
|
string $snippet,
|
|
|
|
string $selected_text,
|
|
|
|
int $from,
|
|
|
|
int $to,
|
|
|
|
int $snippet_from,
|
|
|
|
int $snippet_to,
|
|
|
|
int $column_from,
|
|
|
|
int $column_to,
|
|
|
|
int $shortcode = 0,
|
|
|
|
int $error_level = -1,
|
2020-09-11 04:44:35 +02:00
|
|
|
?array $taint_trace = null,
|
|
|
|
?string $dupe_key = null
|
2020-02-17 00:24:40 +01:00
|
|
|
) {
|
|
|
|
$this->severity = $severity;
|
|
|
|
$this->line_from = $line_from;
|
|
|
|
$this->line_to = $line_to;
|
|
|
|
$this->type = $type;
|
|
|
|
$this->message = $message;
|
|
|
|
$this->file_name = $file_name;
|
|
|
|
$this->file_path = $file_path;
|
|
|
|
$this->snippet = $snippet;
|
|
|
|
$this->selected_text = $selected_text;
|
|
|
|
$this->from = $from;
|
|
|
|
$this->to = $to;
|
|
|
|
$this->snippet_from = $snippet_from;
|
|
|
|
$this->snippet_to = $snippet_to;
|
|
|
|
$this->column_from = $column_from;
|
|
|
|
$this->column_to = $column_to;
|
2020-04-17 06:47:18 +02:00
|
|
|
$this->shortcode = $shortcode;
|
2020-02-17 22:32:16 +01:00
|
|
|
$this->error_level = $error_level;
|
2020-03-19 22:12:16 +01:00
|
|
|
$this->link = 'https://psalm.dev/' . \str_pad((string) $shortcode, 3, "0", \STR_PAD_LEFT);
|
2020-06-30 19:17:51 +02:00
|
|
|
$this->taint_trace = $taint_trace;
|
2020-09-11 04:44:35 +02:00
|
|
|
$this->dupe_key = $dupe_key;
|
|
|
|
}
|
2020-02-17 00:24:40 +01:00
|
|
|
}
|