*/ protected $issues_data; /** @var array */ protected $fixable_issue_counts; /** @var bool */ protected $use_color; /** @var bool */ protected $show_snippet; /** @var bool */ protected $show_info; /** @var bool */ protected $pretty; /** @var bool */ protected $in_ci; /** @var int */ protected $mixed_expression_count; /** @var int */ protected $total_expression_count; /** * @param array $issues_data * @param array $fixable_issue_counts */ public function __construct( array $issues_data, array $fixable_issue_counts, ReportOptions $report_options, int $mixed_expression_count = 1, int $total_expression_count = 1 ) { if (!$report_options->show_info) { $this->issues_data = array_filter( $issues_data, static fn(IssueData $issue_data): bool => $issue_data->severity !== Config::REPORT_INFO ); } else { $this->issues_data = $issues_data; } $this->fixable_issue_counts = $fixable_issue_counts; $this->use_color = $report_options->use_color; $this->show_snippet = $report_options->show_snippet; $this->show_info = $report_options->show_info; $this->pretty = $report_options->pretty; $this->in_ci = $report_options->in_ci; $this->mixed_expression_count = $mixed_expression_count; $this->total_expression_count = $total_expression_count; } protected function xmlEncode(string $data): string { return htmlspecialchars($data, ENT_XML1 | ENT_QUOTES); } abstract public function create(): string; }