From 2a4bb72b7a542a11c871c4009bcd6c2d5f642535 Mon Sep 17 00:00:00 2001 From: Maximo Mena Date: Tue, 21 Feb 2023 20:59:43 -0700 Subject: [PATCH] Minimum changes to prevent deprecated messages in PHP 8.1 --- src/Table.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Table.php b/src/Table.php index a1c66c2..2a4d324 100644 --- a/src/Table.php +++ b/src/Table.php @@ -160,7 +160,7 @@ public function save($outputDataSource) * @throws Exceptions\FieldValidationException * @throws Exceptions\DataSourceException */ - public function current() + public function current(): array { if (count($this->castRows) > 0) { $row = array_shift($this->castRows); @@ -213,7 +213,7 @@ public function __destruct() $this->dataSource->close(); } - public function rewind() + public function rewind(): void { if (0 == $this->currentLine) { $this->currentLine = 1; @@ -223,19 +223,19 @@ public function rewind() } } - public function key() + public function key(): int { return $this->currentLine - count($this->castRows); } - public function next() + public function next(): void { if (0 == count($this->castRows)) { ++$this->currentLine; } } - public function valid() + public function valid(): bool { return count($this->castRows) > 0 || !$this->dataSource->isEof(); }