Skip to content

Commit

Permalink
Suppress PHP 8.1 notices about return type incompatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
adirfische committed Jun 24, 2022
1 parent 2056b43 commit 8f1f43f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ public function changeSheet($sheet_index)
* Rewind the Iterator to the first element.
* Similar to the reset() function for arrays in PHP.
*/
#[\ReturnTypeWillChange]
public function rewind()
{
if ($this->worksheet_reader instanceof OoxmlReader) {
Expand All @@ -241,6 +242,7 @@ public function rewind()
*
* @throws Exception
*/
#[\ReturnTypeWillChange]
public function current()
{
if ($this->row_number === 0 && $this->current_row === false) {
Expand All @@ -260,6 +262,7 @@ public function current()
*
* @throws Exception
*/
#[\ReturnTypeWillChange]
public function next()
{
$this->current_row = array();
Expand Down Expand Up @@ -482,6 +485,7 @@ private function read_next_row()
*
* @return mixed either an integer or a string
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->row_number;
Expand All @@ -493,6 +497,7 @@ public function key()
*
* @return boolean FALSE if there's nothing more to iterate over
*/
#[\ReturnTypeWillChange]
public function valid()
{
return $this->valid;
Expand All @@ -504,6 +509,7 @@ public function valid()
* Ostensibly should return the count of the contained items but this just returns the number
* of rows read so far. It's not really correct but at least coherent.
*/
#[\ReturnTypeWillChange]
public function count()
{
return $this->row_number;
Expand Down

0 comments on commit 8f1f43f

Please sign in to comment.