HippoPHP\Hippo\Reporters\ArrayReporter::addCheckResults PHP Method

addCheckResults() public method

Defined by ReportInterface.
See also: ReportInterface::addCheckResults()
public addCheckResults ( File $file, array $checkResults )
$file HippoPHP\Hippo\File
$checkResults array
    public function addCheckResults(File $file, array $checkResults)
    {
        foreach ($checkResults as $checkResult) {
            foreach ($checkResult->getViolations() as $violation) {
                $key = $this->getArrayKey($violation);
                if (!isset($this->report[$key])) {
                    $this->report[$key] = [];
                }
                $this->report[$key][] = ['file' => $file->getFilename(), 'line' => $violation->getLine(), 'column' => $violation->getColumn(), 'severity' => $violation->getSeverity(), 'message' => $violation->getMessage()];
            }
        }
    }