context = $context; } protected function addError(string $message, int $line = -1, string $type = ParseError::TYPE_ERROR): void { $errors = $this->context->getErrors(); $fileName = $this->context->getFile()->getPath(); $errors->add(new PhpParserError($type, $message, $fileName, $line)); } }