Fix PHP 8.1 deprecations

This commit is contained in:
Adrien Loison committed 2022-01-13 23:04:26 +01:00
1 parent 27c6845b4b
commit e75f6f7301
5 files changed
+29 -29

No files matched your search

+6 -6
View File
@@ -139,7 +139,7 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If the sheet data XML cannot be read
* @return void
*/
public function rewind()
public function rewind() : void
{
$this->xmlReader->close();
@@ -163,7 +163,7 @@ class RowIterator implements IteratorInterface
*
* @return bool
*/
public function valid()
public function valid() : bool
{
return (!$this->hasReachedEndOfFile);
}
@@ -176,7 +176,7 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If unable to read the sheet data XML
* @return void
*/
public function next()
public function next() : void
{
$this->nextRowIndexToBeProcessed++;
@@ -374,7 +374,7 @@ class RowIterator implements IteratorInterface
*
* @return Row|null
*/
public function current()
public function current() : ?Row
{
$rowToBeProcessed = $this->rowBuffer;
@@ -399,7 +399,7 @@ class RowIterator implements IteratorInterface
*
* @return int
*/
public function key()
public function key() : int
{
// TODO: This should return $this->nextRowIndexToBeProcessed
// but to avoid a breaking change, the return value for
@@ -414,7 +414,7 @@ class RowIterator implements IteratorInterface
*
* @return void
*/
public function end()
public function end() : void
{
$this->xmlReader->close();
}