From 1b78e700454cde26a8c31e5341ccbca9dafe98c6 Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Fri, 27 May 2022 18:07:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20fix=20Board?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Board.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Board.php b/src/Board.php index 4777d3b..abf614f 100644 --- a/src/Board.php +++ b/src/Board.php @@ -119,12 +119,9 @@ public function current(): ?Piece return \current($this->squares) !== false ? \current($this->squares): null; } - /** - * @return Piece|null|false - */ - public function next() + public function next(): void { - return \next($this->squares); + \next($this->squares); } public function key(): ?int @@ -137,9 +134,9 @@ public function valid(): bool return null !== $this->key(); } - public function rewind(): ?Piece + public function rewind(): void { - return empty($this->squares) ? null : \reset($this->squares); + \reset($this->squares); } public function jsonSerialize(): string