Skip to content

Commit 7884983

Browse files
committed
Add missing multistate lexer constructor type hints
1 parent 3acc377 commit 7884983

6 files changed

+6
-6
lines changed

src/ArrayBuffer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private function iterableToArray(iterable $tokens): array
4545
return $tokens;
4646
}
4747

48-
public function seek($offset): void
48+
public function seek(mixed $offset): void
4949
{
5050
if ($offset < $this->initial) {
5151
throw new \OutOfRangeException(

src/Buffer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function rewind(): void
5151
$this->seek($this->initial);
5252
}
5353

54-
public function seek($offset): void
54+
public function seek(mixed $offset): void
5555
{
5656
\assert($offset >= 0);
5757

src/BufferInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface BufferInterface extends \SeekableIterator
2020
*
2121
* @param int<0, max> $offset
2222
*/
23-
public function seek($offset): void;
23+
public function seek(mixed $offset): void;
2424

2525
/**
2626
* Return the current token.

src/ExtrusiveBuffer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getBufferSize(): int
4949
return $this->size;
5050
}
5151

52-
public function seek($offset): void
52+
public function seek(mixed $offset): void
5353
{
5454
if ($offset < \array_key_first($this->buffer)) {
5555
$message = \sprintf(self::ERROR_BUFFER_MEMORY_ALREADY_FREED, $offset, $this->size);

src/LazyBuffer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function getBufferCurrentSize(): int
5454
return \count($this->buffer);
5555
}
5656

57-
public function seek($offset): void
57+
public function seek(mixed $offset): void
5858
{
5959
if ($offset < $this->initial) {
6060
throw new \OutOfRangeException(

src/MutableBuffer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private function poll(int $offset): TokenInterface
5454
}
5555
}
5656

57-
public function seek($offset): void
57+
public function seek(mixed $offset): void
5858
{
5959
$this->parent->seek($offset);
6060
}

0 commit comments

Comments
 (0)