packages/SniffRunner/src/File/File.php
protected function addMessage(
        $isError,
        $message,
        $line,
        $column,
        $sniffClassOrCode,
        $data,
        $severity,
        $isFixable = false
    ): bool {
        if (! $isError) { // skip warnings
            return false;
        }

        $message = count($data) ? vsprintf($message, $data) : $message;

        if ($isFixable === true) {
            return $isFixable;
        }

        // do not add non-fixable errors twice
        if ($this->fixer->loops > 0) {
            return false;
        }

        $this->errorAndDiffCollector->addErrorMessage(
            $this->fileInfo,
            $line,
            $message,
            $this->resolveFullyQualifiedCode($sniffClassOrCode)
        );

        return true;
    }
protected function addMessage(
        $isError,
        $message,
        $line,
        $column,
        $sniffClassOrCode,
        $data,
        $severity,
        $isFixable = false
    ): bool {
        if (! $isError) { // skip warnings
            return false;
        }

        $message = count($data) ? vsprintf($message, $data) : $message;

        if ($isFixable === true) {
            return $isFixable;
        }

        // do not add non-fixable errors twice
        if ($this->fixer->loops > 0) {
            return false;
        }

        $this->errorAndDiffCollector->addErrorMessage(
            $this->fileInfo,
            $line,
            $message,
            $this->resolveFullyQualifiedCode($sniffClassOrCode)
        );

        return true;
    }
Delegated from addError().

{@inheritdoc}