line = $line ?? 0; $this->column = $column ?? $offset; if ($offset < 0) { throw new \OutOfRangeException('Offset may not be negative.'); } if ($line !== null && $line < 0) { throw new \OutOfRangeException('Line may not be negative.'); } if ($column !== null && $column < 0) { throw new \OutOfRangeException('Column may not be negative.'); } } public function getOffset(): int { return $this->offset; } public function getLine(): int { return $this->line; } public function getColumn(): int { return $this->column; } public function getSourceUrl(): ?UriInterface { return $this->sourceUrl; } }