getRawMessage(), // Do not include "on line ..." in the error message Range::fromError($error, $content), $error->getCode(), $severity, $source ); } /** * @param string $message The diagnostic's message * @param Range $range The range at which the message applies * @param int $code The diagnostic's code * @param int $severity DiagnosticSeverity * @param string $source A human-readable string describing the source of this diagnostic */ public function __construct(string $message = null, Range $range = null, int $code = null, int $severity = null, string $source = null) { $this->message = $message; $this->range = $range; $this->code = $code; $this->severity = $severity; $this->source = $source; } }