/** @var string the path of the file to save to. */
private$baseline_path;
/**
* Maps project file paths to a set of issue types emitted in that file.
* @var array<string,array<string, true>>
*/
private$suppressions_by_file=[];
/**
* Maps issue name to a set of hashes of unique issues.
*
* This is used to determine the count of issues to show in the baseline being saved.
*
* This is approximate because BufferingCollector deduplicates issues slightly differently.
*
* @var array<string,array<string,true>>
*/
private$suppressions_by_type=[];
publicfunction__construct(string$baseline_path)
{
$this->baseline_path=$baseline_path;
}
/**
* This method is called before Phan emits an issue not suppressed elsewhere.
*
* @param IssueInstance $issue_instance
*
* @return false this plugin does not suppress anything - it just records issues to generate a file that can be used by BaselineReadingPlugin in subsequent runs.
// Would prefer to use formatSortableKey, but this doesn't provide the IssueInstance, and plugins have issues that can't be fetched with Issue::fromType.
$result.=" // 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.\n";
$result.=" // (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)\n";