diff --git a/src/VCR/Storage/AbstractStorage.php b/src/VCR/Storage/AbstractStorage.php index e3658bb30..971fe0c57 100644 --- a/src/VCR/Storage/AbstractStorage.php +++ b/src/VCR/Storage/AbstractStorage.php @@ -68,7 +68,7 @@ public function __construct(string $cassettePath, string $cassetteName, string $ * * @return array|null parsed current record */ - public function current() + public function current(): mixed { return $this->current; } diff --git a/src/VCR/Storage/Blackhole.php b/src/VCR/Storage/Blackhole.php index b413fe2af..09e8ac2d9 100644 --- a/src/VCR/Storage/Blackhole.php +++ b/src/VCR/Storage/Blackhole.php @@ -35,10 +35,9 @@ public function key(): int throw new \BadMethodCallException('Not implemented'); } - /** @return array|null */ - public function next(): ?array + /** @return void */ + public function next(): void { - return null; } public function rewind(): void diff --git a/src/VCR/Storage/Yaml.php b/src/VCR/Storage/Yaml.php index ed6be615b..f033d392e 100644 --- a/src/VCR/Storage/Yaml.php +++ b/src/VCR/Storage/Yaml.php @@ -88,7 +88,7 @@ public function rewind(): void $this->position = 0; } - public function valid() + public function valid(): bool { if (null === $this->current) { $this->next(); diff --git a/tests/Unit/Storage/AbstractStorageTest.php b/tests/Unit/Storage/AbstractStorageTest.php index 413a11050..5ed4ad188 100644 --- a/tests/Unit/Storage/AbstractStorageTest.php +++ b/tests/Unit/Storage/AbstractStorageTest.php @@ -51,7 +51,7 @@ public function next(): void { } - public function valid() + public function valid(): bool { return (bool) $this->position; }