Merge branch release/21.7.7 of zentao/zentaopms (#12417)

This commit is contained in:
刘刚
2025-11-19 11:05:04 +08:00
committed by Gitfox
18 changed files with 467 additions and 457 deletions
+172 -204
View File
@@ -1,316 +1,284 @@
diff --git a/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php b/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php
index 6f85f320c8f..8551d756c17 100644
--- a/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php
+++ b/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php
@@ -83,7 +83,7 @@ class XMLReader extends \XMLReader
* @throws \Box\Spout\Reader\Exception\XMLProcessingException If an error/warning occurred
* @return bool TRUE on success or FALSE on failure
*/
- public function read()
+ public function read(): bool
{
$this->useXMLInternalErrors();
@@ -119,7 +119,7 @@ class XMLReader extends \XMLReader
* @throws \Box\Spout\Reader\Exception\XMLProcessingException If an error/warning occurred
* @return bool TRUE on success or FALSE on failure
*/
- public function next($localName = null)
+ public function next($localName = null): bool
{
$this->useXMLInternalErrors();
diff --git a/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php b/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php
index a54b8b192b0..2a5616d10f8 100644
--- a/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php
+++ b/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php
@@ -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|null
{
$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
diff --git a/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php b/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php
index 81f481c3cdc..5b6315e9ac5 100644
--- a/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php
+++ b/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php
@@ -38,7 +38,7 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
- public function rewind()
+ public function rewind(): void
{
$this->currentSheetIndex = 0;
}
@@ -49,7 +49,7 @@ class SheetIterator implements IteratorInterface
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
{
return ($this->currentSheetIndex < \count($this->sheets));
}
@@ -60,7 +60,7 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
- public function next()
+ public function next(): void
{
// Using isset here because it is way faster than array_key_exists...
if (isset($this->sheets[$this->currentSheetIndex])) {
@@ -77,7 +77,7 @@ class SheetIterator implements IteratorInterface
*
* @return \Box\Spout\Reader\XLSX\Sheet
*/
- public function current()
+ public function current(): \Box\Spout\Reader\XLSX\Sheet
{
return $this->sheets[$this->currentSheetIndex];
}
@@ -88,7 +88,7 @@ class SheetIterator implements IteratorInterface
*
* @return int
*/
- public function key()
+ public function key(): mixed
{
return $this->currentSheetIndex + 1;
}
diff --git a/vendor/box/spout/src/Spout/Reader/CSV/RowIterator.php b/vendor/box/spout/src/Spout/Reader/CSV/RowIterator.php
index 78e66501320..afef215101b 100644
index 0c35e8572a9..f8727c3ca44 100644
--- a/vendor/box/spout/src/Spout/Reader/CSV/RowIterator.php
+++ b/vendor/box/spout/src/Spout/Reader/CSV/RowIterator.php
@@ -84,7 +84,7 @@ class RowIterator implements IteratorInterface
@@ -84,6 +84,7 @@ class RowIterator implements IteratorInterface
*
* @return void
*/
- public function rewind()
+ public function rewind(): void
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->rewindAndSkipBom();
@@ -114,7 +114,7 @@ class RowIterator implements IteratorInterface
@@ -114,6 +115,7 @@ class RowIterator implements IteratorInterface
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
+ #[\ReturnTypeWillChange]
public function valid()
{
return ($this->filePointer && !$this->hasReachedEndOfFile);
}
@@ -126,7 +126,7 @@ class RowIterator implements IteratorInterface
@@ -126,6 +128,7 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\EncodingConversionException If unable to convert data to UTF-8
* @return void
*/
- public function next()
+ public function next(): void
+ #[\ReturnTypeWillChange]
public function next()
{
$this->hasReachedEndOfFile = $this->globalFunctionsHelper->feof($this->filePointer);
@@ -224,7 +224,7 @@ class RowIterator implements IteratorInterface
@@ -224,6 +227,7 @@ class RowIterator implements IteratorInterface
*
* @return Row|null
*/
- public function current()
+ public function current(): Row|null
+ #[\ReturnTypeWillChange]
public function current()
{
return $this->rowBuffer;
}
@@ -235,7 +235,7 @@ class RowIterator implements IteratorInterface
@@ -235,6 +239,7 @@ class RowIterator implements IteratorInterface
*
* @return int
*/
- public function key()
+ public function key(): int
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->numReadRows;
}
diff --git a/vendor/box/spout/src/Spout/Reader/CSV/SheetIterator.php b/vendor/box/spout/src/Spout/Reader/CSV/SheetIterator.php
index 69eb58a0ba9..31347ee6190 100644
index da675221a06..42bc0999e69 100644
--- a/vendor/box/spout/src/Spout/Reader/CSV/SheetIterator.php
+++ b/vendor/box/spout/src/Spout/Reader/CSV/SheetIterator.php
@@ -30,7 +30,7 @@ class SheetIterator implements IteratorInterface
@@ -30,6 +30,7 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
- public function rewind()
+ public function rewind(): void
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->hasReadUniqueSheet = false;
}
@@ -41,7 +41,7 @@ class SheetIterator implements IteratorInterface
@@ -41,6 +42,7 @@ class SheetIterator implements IteratorInterface
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
+ #[\ReturnTypeWillChange]
public function valid()
{
return (!$this->hasReadUniqueSheet);
}
@@ -52,7 +52,7 @@ class SheetIterator implements IteratorInterface
@@ -52,6 +54,7 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
- public function next()
+ public function next(): void
+ #[\ReturnTypeWillChange]
public function next()
{
$this->hasReadUniqueSheet = true;
}
@@ -63,7 +63,7 @@ class SheetIterator implements IteratorInterface
@@ -63,6 +66,7 @@ class SheetIterator implements IteratorInterface
*
* @return \Box\Spout\Reader\CSV\Sheet
*/
- public function current()
+ public function current(): \Box\Spout\Reader\CSV\Sheet
+ #[\ReturnTypeWillChange]
public function current()
{
return $this->sheet;
}
@@ -74,7 +74,7 @@ class SheetIterator implements IteratorInterface
@@ -74,6 +78,7 @@ class SheetIterator implements IteratorInterface
*
* @return int
*/
- public function key()
+ public function key(): int
+ #[\ReturnTypeWillChange]
public function key()
{
return 1;
}
diff --git a/vendor/box/spout/src/Spout/Reader/ODS/RowIterator.php b/vendor/box/spout/src/Spout/Reader/ODS/RowIterator.php
index 81f0953d811..965275f0a19 100644
index 0cd87759e39..2fbdd5e043c 100644
--- a/vendor/box/spout/src/Spout/Reader/ODS/RowIterator.php
+++ b/vendor/box/spout/src/Spout/Reader/ODS/RowIterator.php
@@ -118,7 +118,7 @@ class RowIterator implements IteratorInterface
@@ -118,6 +118,7 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Reader\Exception\IteratorNotRewindableException If the iterator is rewound more than once
* @return void
*/
- public function rewind()
+ public function rewind(): void
+ #[\ReturnTypeWillChange]
public function rewind()
{
// Because sheet and row data is located in the file, we can't rewind both the
// sheet iterator and the row iterator, as XML file cannot be read backwards.
@@ -142,7 +142,7 @@ class RowIterator implements IteratorInterface
@@ -142,6 +143,7 @@ class RowIterator implements IteratorInterface
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
+ #[\ReturnTypeWillChange]
public function valid()
{
return (!$this->hasReachedEndOfFile);
}
@@ -155,7 +155,7 @@ class RowIterator implements IteratorInterface
@@ -155,6 +157,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
+ #[\ReturnTypeWillChange]
public function next()
{
if ($this->doesNeedDataForNextRowToBeProcessed()) {
$this->readDataForNextRow();
@@ -356,7 +356,7 @@ class RowIterator implements IteratorInterface
@@ -356,6 +359,7 @@ class RowIterator implements IteratorInterface
*
* @return Row
*/
- public function current()
+ public function current(): Row
+ #[\ReturnTypeWillChange]
public function current()
{
return $this->rowBuffer;
}
@@ -367,7 +367,7 @@ class RowIterator implements IteratorInterface
@@ -367,6 +371,7 @@ class RowIterator implements IteratorInterface
*
* @return int
*/
- public function key()
+ public function key(): int
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->lastRowIndexProcessed;
}
diff --git a/vendor/box/spout/src/Spout/Reader/ODS/SheetIterator.php b/vendor/box/spout/src/Spout/Reader/ODS/SheetIterator.php
index c7b8cd9dcf8..5b3351fd1a9 100644
index 6d5a0fcb2ef..0a070f9c007 100644
--- a/vendor/box/spout/src/Spout/Reader/ODS/SheetIterator.php
+++ b/vendor/box/spout/src/Spout/Reader/ODS/SheetIterator.php
@@ -79,7 +79,7 @@ class SheetIterator implements IteratorInterface
@@ -79,6 +79,7 @@ class SheetIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If unable to open the XML file containing sheets' data
* @return void
*/
- public function rewind()
+ public function rewind(): void
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->xmlReader->close();
@@ -131,7 +131,7 @@ class SheetIterator implements IteratorInterface
@@ -131,6 +132,7 @@ class SheetIterator implements IteratorInterface
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->hasFoundSheet;
}
@@ -142,7 +142,7 @@ class SheetIterator implements IteratorInterface
@@ -142,6 +144,7 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
- public function next()
+ public function next(): void
+ #[\ReturnTypeWillChange]
public function next()
{
$this->hasFoundSheet = $this->xmlReader->readUntilNodeFound(self::XML_NODE_TABLE);
@@ -157,7 +157,7 @@ class SheetIterator implements IteratorInterface
@@ -157,6 +160,7 @@ class SheetIterator implements IteratorInterface
*
* @return \Box\Spout\Reader\ODS\Sheet
*/
- public function current()
+ public function current(): \Box\Spout\Reader\ODS\Sheet
+ #[\ReturnTypeWillChange]
public function current()
{
$escapedSheetName = $this->xmlReader->getAttribute(self::XML_ATTRIBUTE_TABLE_NAME);
$sheetName = $this->escaper->unescape($escapedSheetName);
@@ -214,7 +214,7 @@ class SheetIterator implements IteratorInterface
@@ -214,6 +218,7 @@ class SheetIterator implements IteratorInterface
*
* @return int
*/
- public function key()
+ public function key(): int
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->currentSheetIndex + 1;
diff --git a/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php b/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php
index 8551d756c17..9e782f7cdec 100644
--- a/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php
+++ b/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php
@@ -83,6 +83,7 @@ class XMLReader extends \XMLReader
* @throws \Box\Spout\Reader\Exception\XMLProcessingException If an error/warning occurred
* @return bool TRUE on success or FALSE on failure
*/
+ #[\ReturnTypeWillChange]
public function read()
{
$this->useXMLInternalErrors();
@@ -119,6 +120,7 @@ class XMLReader extends \XMLReader
* @throws \Box\Spout\Reader\Exception\XMLProcessingException If an error/warning occurred
* @return bool TRUE on success or FALSE on failure
*/
+ #[\ReturnTypeWillChange]
public function next($localName = null)
{
$this->useXMLInternalErrors();
diff --git a/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php b/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php
index cafe72e2348..14dd4f0f13c 100644
--- a/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php
+++ b/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php
@@ -139,6 +139,7 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If the sheet data XML cannot be read
* @return void
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->xmlReader->close();
@@ -163,6 +164,7 @@ class RowIterator implements IteratorInterface
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return (!$this->hasReachedEndOfFile);
@@ -176,6 +178,7 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If unable to read the sheet data XML
* @return void
*/
+ #[\ReturnTypeWillChange]
public function next()
{
$this->nextRowIndexToBeProcessed++;
@@ -374,6 +377,7 @@ class RowIterator implements IteratorInterface
*
* @return Row|null
*/
+ #[\ReturnTypeWillChange]
public function current()
{
$rowToBeProcessed = $this->rowBuffer;
@@ -399,6 +403,7 @@ class RowIterator implements IteratorInterface
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function key()
{
// TODO: This should return $this->nextRowIndexToBeProcessed
diff --git a/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php b/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php
index e79a2cda95f..602370f2354 100644
--- a/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php
+++ b/vendor/box/spout/src/Spout/Reader/XLSX/SheetIterator.php
@@ -38,6 +38,7 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->currentSheetIndex = 0;
@@ -49,6 +50,7 @@ class SheetIterator implements IteratorInterface
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return ($this->currentSheetIndex < \count($this->sheets));
@@ -60,6 +62,7 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
+ #[\ReturnTypeWillChange]
public function next()
{
// Using isset here because it is way faster than array_key_exists...
@@ -77,6 +80,7 @@ class SheetIterator implements IteratorInterface
*
* @return \Box\Spout\Reader\XLSX\Sheet
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return $this->sheets[$this->currentSheetIndex];
@@ -88,6 +92,7 @@ class SheetIterator implements IteratorInterface
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->currentSheetIndex + 1;
}
@@ -1,235 +1,220 @@
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php
@@ -42,7 +42,7 @@
/**
* Rewind iterator.
*/
- public function rewind()
+ public function rewind(): void
{
$this->position = 0;
}
@@ -52,7 +52,7 @@
*
* @return Worksheet
*/
- public function current()
+ public function current(): Worksheet
{
return $this->subject->getSheet($this->position);
}
@@ -62,7 +62,7 @@
*
* @return int
*/
- public function key()
+ public function key(): int
{
return $this->position;
}
@@ -70,7 +70,7 @@
/**
* Next value.
*/
- public function next()
+ public function next(): void
{
++$this->position;
}
@@ -80,7 +80,7 @@
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
{
return $this->position < $this->subject->getSheetCount() && $this->position >= 0;
}
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
@@ -113,7 +113,7 @@ class RowCellIterator extends CellIterator
/**
* Rewind the iterator to the starting column.
*/
- public function rewind()
+ public function rewind(): void
{
$this->currentColumnIndex = $this->startColumnIndex;
}
@@ -123,7 +123,7 @@ class RowCellIterator extends CellIterator
*
* @return \PhpOffice\PhpSpreadsheet\Cell\Cell
*/
- public function current()
+ public function current(): null|\PhpOffice\PhpSpreadsheet\Cell\Cell
{
return $this->worksheet->getCellByColumnAndRow($this->currentColumnIndex, $this->rowIndex);
}
@@ -133,7 +133,7 @@ class RowCellIterator extends CellIterator
*
* @return string
*/
- public function key()
+ public function key(): string
{
return Coordinate::stringFromColumnIndex($this->currentColumnIndex);
}
@@ -141,7 +141,7 @@ class RowCellIterator extends CellIterator
/**
* Set the iterator to its next value.
*/
- public function next()
+ public function next(): void
{
do {
++$this->currentColumnIndex;
@@ -165,7 +165,7 @@ class RowCellIterator extends CellIterator
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
{
return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;
}
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php
@@ -117,7 +117,7 @@ class RowIterator implements \Iterator
/**
* Rewind the iterator to the starting row.
*/
- public function rewind()
+ public function rewind(): void
{
$this->position = $this->startRow;
}
@@ -127,7 +127,7 @@ class RowIterator implements \Iterator
*
* @return Row
*/
- public function current()
+ public function current(): Row
{
return new Row($this->subject, $this->position);
}
@@ -137,7 +137,7 @@ class RowIterator implements \Iterator
*
* @return int
*/
- public function key()
+ public function key(): int
{
return $this->position;
}
@@ -145,7 +145,7 @@ class RowIterator implements \Iterator
/**
* Set the iterator to its next value.
*/
- public function next()
+ public function next(): void
{
++$this->position;
}
@@ -163,7 +163,7 @@ class RowIterator implements \Iterator
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
{
return $this->position <= $this->endRow && $this->position >= $this->startRow;
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php
index 00dc6ac8d03..a319684ccf1 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php
@@ -111,7 +111,7 @@ class ColumnCellIterator extends CellIterator
@@ -111,6 +111,7 @@ class ColumnCellIterator extends CellIterator
/**
* Rewind the iterator to the starting row.
*/
- public function rewind()
+ public function rewind(): void
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->currentRow = $this->startRow;
}
@@ -121,7 +121,7 @@ class ColumnCellIterator extends CellIterator
@@ -121,6 +122,7 @@ class ColumnCellIterator extends CellIterator
*
* @return null|\PhpOffice\PhpSpreadsheet\Cell\Cell
*/
- public function current()
+ public function current(): null|\PhpOffice\PhpSpreadsheet\Cell\Cell
+ #[\ReturnTypeWillChange]
public function current()
{
return $this->worksheet->getCellByColumnAndRow($this->columnIndex, $this->currentRow);
}
@@ -131,7 +131,7 @@ class ColumnCellIterator extends CellIterator
@@ -131,6 +133,7 @@ class ColumnCellIterator extends CellIterator
*
* @return int
*/
- public function key()
+ public function key(): int
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->currentRow;
}
@@ -139,7 +139,7 @@ class ColumnCellIterator extends CellIterator
@@ -139,6 +142,7 @@ class ColumnCellIterator extends CellIterator
/**
* Set the iterator to its next value.
*/
- public function next()
+ public function next(): void
+ #[\ReturnTypeWillChange]
public function next()
{
do {
++$this->currentRow;
@@ -165,7 +165,7 @@ class ColumnCellIterator extends CellIterator
@@ -165,6 +169,7 @@ class ColumnCellIterator extends CellIterator
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->currentRow <= $this->endRow && $this->currentRow >= $this->startRow;
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php
index 80b548d6197..c449bad2506 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php
@@ -122,7 +122,7 @@ class ColumnIterator implements \Iterator
@@ -122,6 +122,7 @@ class ColumnIterator implements \Iterator
/**
* Rewind the iterator to the starting column.
*/
- public function rewind()
+ public function rewind(): void
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->currentColumnIndex = $this->startColumnIndex;
}
@@ -132,7 +132,7 @@ class ColumnIterator implements \Iterator
@@ -132,6 +133,7 @@ class ColumnIterator implements \Iterator
*
* @return Column
*/
- public function current()
+ public function current(): Column
+ #[\ReturnTypeWillChange]
public function current()
{
return new Column($this->worksheet, Coordinate::stringFromColumnIndex($this->currentColumnIndex));
}
@@ -142,7 +142,7 @@ class ColumnIterator implements \Iterator
@@ -142,6 +144,7 @@ class ColumnIterator implements \Iterator
*
* @return string
*/
- public function key()
+ public function key(): string
+ #[\ReturnTypeWillChange]
public function key()
{
return Coordinate::stringFromColumnIndex($this->currentColumnIndex);
}
@@ -150,7 +150,7 @@ class ColumnIterator implements \Iterator
@@ -150,6 +153,7 @@ class ColumnIterator implements \Iterator
/**
* Set the iterator to its next value.
*/
- public function next()
+ public function next(): void
+ #[\ReturnTypeWillChange]
public function next()
{
++$this->currentColumnIndex;
}
@@ -168,7 +168,7 @@ class ColumnIterator implements \Iterator
@@ -168,6 +172,7 @@ class ColumnIterator implements \Iterator
*
* @return bool
*/
- public function valid()
+ public function valid(): bool
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php
index 348ca96f400..075a701cc69 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php
@@ -42,6 +42,7 @@ class Iterator implements \Iterator
/**
* Rewind iterator.
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->position = 0;
@@ -52,6 +53,7 @@ class Iterator implements \Iterator
*
* @return Worksheet
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return $this->subject->getSheet($this->position);
@@ -62,6 +64,7 @@ class Iterator implements \Iterator
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->position;
@@ -70,6 +73,7 @@ class Iterator implements \Iterator
/**
* Next value.
*/
+ #[\ReturnTypeWillChange]
public function next()
{
++$this->position;
@@ -80,6 +84,7 @@ class Iterator implements \Iterator
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->position < $this->subject->getSheetCount() && $this->position >= 0;
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
index 3dce799c284..8094d754a62 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
@@ -113,6 +113,7 @@ class RowCellIterator extends CellIterator
/**
* Rewind the iterator to the starting column.
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->currentColumnIndex = $this->startColumnIndex;
@@ -123,6 +124,7 @@ class RowCellIterator extends CellIterator
*
* @return \PhpOffice\PhpSpreadsheet\Cell\Cell
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return $this->worksheet->getCellByColumnAndRow($this->currentColumnIndex, $this->rowIndex);
@@ -133,6 +135,7 @@ class RowCellIterator extends CellIterator
*
* @return string
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return Coordinate::stringFromColumnIndex($this->currentColumnIndex);
@@ -141,6 +144,7 @@ class RowCellIterator extends CellIterator
/**
* Set the iterator to its next value.
*/
+ #[\ReturnTypeWillChange]
public function next()
{
do {
@@ -165,6 +169,7 @@ class RowCellIterator extends CellIterator
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php
index 009ff5de430..8b83ea4ec42 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php
@@ -117,6 +117,7 @@ class RowIterator implements \Iterator
/**
* Rewind the iterator to the starting row.
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->position = $this->startRow;
@@ -127,6 +128,7 @@ class RowIterator implements \Iterator
*
* @return Row
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return new Row($this->subject, $this->position);
@@ -137,6 +139,7 @@ class RowIterator implements \Iterator
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->position;
@@ -145,6 +148,7 @@ class RowIterator implements \Iterator
/**
* Set the iterator to its next value.
*/
+ #[\ReturnTypeWillChange]
public function next()
{
++$this->position;
@@ -163,6 +167,7 @@ class RowIterator implements \Iterator
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->position <= $this->endRow && $this->position >= $this->startRow;
+1 -1
View File
@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0::getLoader();
return ComposerAutoloaderInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::getLoader();
+10 -5
View File
@@ -84,7 +84,8 @@ class RowIterator implements IteratorInterface
*
* @return void
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->rewindAndSkipBom();
@@ -114,7 +115,8 @@ class RowIterator implements IteratorInterface
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return ($this->filePointer && !$this->hasReachedEndOfFile);
}
@@ -126,7 +128,8 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\EncodingConversionException If unable to convert data to UTF-8
* @return void
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
$this->hasReachedEndOfFile = $this->globalFunctionsHelper->feof($this->filePointer);
@@ -224,7 +227,8 @@ class RowIterator implements IteratorInterface
*
* @return Row|null
*/
public function current(): Row|null
#[\ReturnTypeWillChange]
public function current()
{
return $this->rowBuffer;
}
@@ -235,7 +239,8 @@ class RowIterator implements IteratorInterface
*
* @return int
*/
public function key(): int
#[\ReturnTypeWillChange]
public function key()
{
return $this->numReadRows;
}
+10 -5
View File
@@ -30,7 +30,8 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->hasReadUniqueSheet = false;
}
@@ -41,7 +42,8 @@ class SheetIterator implements IteratorInterface
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return (!$this->hasReadUniqueSheet);
}
@@ -52,7 +54,8 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
$this->hasReadUniqueSheet = true;
}
@@ -63,7 +66,8 @@ class SheetIterator implements IteratorInterface
*
* @return \Box\Spout\Reader\CSV\Sheet
*/
public function current(): \Box\Spout\Reader\CSV\Sheet
#[\ReturnTypeWillChange]
public function current()
{
return $this->sheet;
}
@@ -74,7 +78,8 @@ class SheetIterator implements IteratorInterface
*
* @return int
*/
public function key(): int
#[\ReturnTypeWillChange]
public function key()
{
return 1;
}
+10 -5
View File
@@ -118,7 +118,8 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Reader\Exception\IteratorNotRewindableException If the iterator is rewound more than once
* @return void
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
// Because sheet and row data is located in the file, we can't rewind both the
// sheet iterator and the row iterator, as XML file cannot be read backwards.
@@ -142,7 +143,8 @@ class RowIterator implements IteratorInterface
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return (!$this->hasReachedEndOfFile);
}
@@ -155,7 +157,8 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If unable to read the sheet data XML
* @return void
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
if ($this->doesNeedDataForNextRowToBeProcessed()) {
$this->readDataForNextRow();
@@ -356,7 +359,8 @@ class RowIterator implements IteratorInterface
*
* @return Row
*/
public function current(): Row
#[\ReturnTypeWillChange]
public function current()
{
return $this->rowBuffer;
}
@@ -367,7 +371,8 @@ class RowIterator implements IteratorInterface
*
* @return int
*/
public function key(): int
#[\ReturnTypeWillChange]
public function key()
{
return $this->lastRowIndexProcessed;
}
+10 -5
View File
@@ -79,7 +79,8 @@ class SheetIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If unable to open the XML file containing sheets' data
* @return void
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->xmlReader->close();
@@ -131,7 +132,8 @@ class SheetIterator implements IteratorInterface
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return $this->hasFoundSheet;
}
@@ -142,7 +144,8 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
$this->hasFoundSheet = $this->xmlReader->readUntilNodeFound(self::XML_NODE_TABLE);
@@ -157,7 +160,8 @@ class SheetIterator implements IteratorInterface
*
* @return \Box\Spout\Reader\ODS\Sheet
*/
public function current(): \Box\Spout\Reader\ODS\Sheet
#[\ReturnTypeWillChange]
public function current()
{
$escapedSheetName = $this->xmlReader->getAttribute(self::XML_ATTRIBUTE_TABLE_NAME);
$sheetName = $this->escaper->unescape($escapedSheetName);
@@ -214,7 +218,8 @@ class SheetIterator implements IteratorInterface
*
* @return int
*/
public function key(): int
#[\ReturnTypeWillChange]
public function key()
{
return $this->currentSheetIndex + 1;
}
@@ -83,7 +83,8 @@ class XMLReader extends \XMLReader
* @throws \Box\Spout\Reader\Exception\XMLProcessingException If an error/warning occurred
* @return bool TRUE on success or FALSE on failure
*/
public function read(): bool
#[\ReturnTypeWillChange]
public function read()
{
$this->useXMLInternalErrors();
@@ -119,7 +120,8 @@ class XMLReader extends \XMLReader
* @throws \Box\Spout\Reader\Exception\XMLProcessingException If an error/warning occurred
* @return bool TRUE on success or FALSE on failure
*/
public function next($localName = null): bool
#[\ReturnTypeWillChange]
public function next($localName = null)
{
$this->useXMLInternalErrors();
+10 -5
View File
@@ -139,7 +139,8 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If the sheet data XML cannot be read
* @return void
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->xmlReader->close();
@@ -163,7 +164,8 @@ class RowIterator implements IteratorInterface
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return (!$this->hasReachedEndOfFile);
}
@@ -176,7 +178,8 @@ class RowIterator implements IteratorInterface
* @throws \Box\Spout\Common\Exception\IOException If unable to read the sheet data XML
* @return void
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
$this->nextRowIndexToBeProcessed++;
@@ -374,7 +377,8 @@ class RowIterator implements IteratorInterface
*
* @return Row|null
*/
public function current(): Row|null
#[\ReturnTypeWillChange]
public function current()
{
$rowToBeProcessed = $this->rowBuffer;
@@ -399,7 +403,8 @@ class RowIterator implements IteratorInterface
*
* @return int
*/
public function key(): int
#[\ReturnTypeWillChange]
public function key()
{
// TODO: This should return $this->nextRowIndexToBeProcessed
// but to avoid a breaking change, the return value for
@@ -38,7 +38,8 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->currentSheetIndex = 0;
}
@@ -49,7 +50,8 @@ class SheetIterator implements IteratorInterface
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return ($this->currentSheetIndex < \count($this->sheets));
}
@@ -60,7 +62,8 @@ class SheetIterator implements IteratorInterface
*
* @return void
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
// Using isset here because it is way faster than array_key_exists...
if (isset($this->sheets[$this->currentSheetIndex])) {
@@ -77,7 +80,8 @@ class SheetIterator implements IteratorInterface
*
* @return \Box\Spout\Reader\XLSX\Sheet
*/
public function current(): \Box\Spout\Reader\XLSX\Sheet
#[\ReturnTypeWillChange]
public function current()
{
return $this->sheets[$this->currentSheetIndex];
}
@@ -88,7 +92,8 @@ class SheetIterator implements IteratorInterface
*
* @return int
*/
public function key(): mixed
#[\ReturnTypeWillChange]
public function key()
{
return $this->currentSheetIndex + 1;
}
+7 -7
View File
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0
class ComposerAutoloaderInitd8f5ceb6dd2b1c87f9f3c117b97ef46e
{
private static $loader;
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitd8f5ceb6dd2b1c87f9f3c117b97ef46e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitd8f5ceb6dd2b1c87f9f3c117b97ef46e', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@@ -51,12 +51,12 @@ class ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire010dc2e2741263c8a65c6eb49fb81ea0($fileIdentifier, $file);
composerRequired8f5ceb6dd2b1c87f9f3c117b97ef46e($fileIdentifier, $file);
}
return $loader;
@@ -68,7 +68,7 @@ class ComposerAutoloaderInit010dc2e2741263c8a65c6eb49fb81ea0
* @param string $file
* @return void
*/
function composerRequire010dc2e2741263c8a65c6eb49fb81ea0($fileIdentifier, $file)
function composerRequired8f5ceb6dd2b1c87f9f3c117b97ef46e($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+5 -5
View File
@@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0
class ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e
{
public static $files = array (
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
@@ -262,10 +262,10 @@ class ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$prefixesPsr0;
$loader->classMap = ComposerStaticInit010dc2e2741263c8a65c6eb49fb81ea0::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$prefixesPsr0;
$loader->classMap = ComposerStaticInitd8f5ceb6dd2b1c87f9f3c117b97ef46e::$classMap;
}, null, ClassLoader::class);
}
+2 -2
View File
@@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'c2a913f13cd2a11f9cb3c743ebcee2a1394e3034',
'reference' => 'e4941afac6ca443486032ed8e0c3fd983f07f9f0',
'name' => '__root__',
'dev' => true,
),
@@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => 'c2a913f13cd2a11f9cb3c743ebcee2a1394e3034',
'reference' => 'e4941afac6ca443486032ed8e0c3fd983f07f9f0',
'dev_requirement' => false,
),
'box/spout' => array(
@@ -111,7 +111,8 @@ class ColumnCellIterator extends CellIterator
/**
* Rewind the iterator to the starting row.
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->currentRow = $this->startRow;
}
@@ -121,7 +122,8 @@ class ColumnCellIterator extends CellIterator
*
* @return null|\PhpOffice\PhpSpreadsheet\Cell\Cell
*/
public function current(): null|\PhpOffice\PhpSpreadsheet\Cell\Cell
#[\ReturnTypeWillChange]
public function current()
{
return $this->worksheet->getCellByColumnAndRow($this->columnIndex, $this->currentRow);
}
@@ -131,7 +133,8 @@ class ColumnCellIterator extends CellIterator
*
* @return int
*/
public function key(): int
#[\ReturnTypeWillChange]
public function key()
{
return $this->currentRow;
}
@@ -139,7 +142,8 @@ class ColumnCellIterator extends CellIterator
/**
* Set the iterator to its next value.
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
do {
++$this->currentRow;
@@ -165,7 +169,8 @@ class ColumnCellIterator extends CellIterator
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return $this->currentRow <= $this->endRow && $this->currentRow >= $this->startRow;
}
@@ -122,7 +122,8 @@ class ColumnIterator implements \Iterator
/**
* Rewind the iterator to the starting column.
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->currentColumnIndex = $this->startColumnIndex;
}
@@ -132,7 +133,8 @@ class ColumnIterator implements \Iterator
*
* @return Column
*/
public function current(): Column
#[\ReturnTypeWillChange]
public function current()
{
return new Column($this->worksheet, Coordinate::stringFromColumnIndex($this->currentColumnIndex));
}
@@ -142,7 +144,8 @@ class ColumnIterator implements \Iterator
*
* @return string
*/
public function key(): string
#[\ReturnTypeWillChange]
public function key()
{
return Coordinate::stringFromColumnIndex($this->currentColumnIndex);
}
@@ -150,7 +153,8 @@ class ColumnIterator implements \Iterator
/**
* Set the iterator to its next value.
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
++$this->currentColumnIndex;
}
@@ -168,7 +172,8 @@ class ColumnIterator implements \Iterator
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;
}
@@ -42,7 +42,8 @@ class Iterator implements \Iterator
/**
* Rewind iterator.
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->position = 0;
}
@@ -52,7 +53,8 @@ class Iterator implements \Iterator
*
* @return Worksheet
*/
public function current(): Worksheet
#[\ReturnTypeWillChange]
public function current()
{
return $this->subject->getSheet($this->position);
}
@@ -62,7 +64,8 @@ class Iterator implements \Iterator
*
* @return int
*/
public function key(): int
#[\ReturnTypeWillChange]
public function key()
{
return $this->position;
}
@@ -70,7 +73,8 @@ class Iterator implements \Iterator
/**
* Next value.
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
++$this->position;
}
@@ -80,7 +84,8 @@ class Iterator implements \Iterator
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return $this->position < $this->subject->getSheetCount() && $this->position >= 0;
}
@@ -113,7 +113,8 @@ class RowCellIterator extends CellIterator
/**
* Rewind the iterator to the starting column.
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->currentColumnIndex = $this->startColumnIndex;
}
@@ -123,7 +124,8 @@ class RowCellIterator extends CellIterator
*
* @return \PhpOffice\PhpSpreadsheet\Cell\Cell
*/
public function current(): null|\PhpOffice\PhpSpreadsheet\Cell\Cell
#[\ReturnTypeWillChange]
public function current()
{
return $this->worksheet->getCellByColumnAndRow($this->currentColumnIndex, $this->rowIndex);
}
@@ -133,7 +135,8 @@ class RowCellIterator extends CellIterator
*
* @return string
*/
public function key(): string
#[\ReturnTypeWillChange]
public function key()
{
return Coordinate::stringFromColumnIndex($this->currentColumnIndex);
}
@@ -141,7 +144,8 @@ class RowCellIterator extends CellIterator
/**
* Set the iterator to its next value.
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
do {
++$this->currentColumnIndex;
@@ -165,7 +169,8 @@ class RowCellIterator extends CellIterator
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex;
}
@@ -117,7 +117,8 @@ class RowIterator implements \Iterator
/**
* Rewind the iterator to the starting row.
*/
public function rewind(): void
#[\ReturnTypeWillChange]
public function rewind()
{
$this->position = $this->startRow;
}
@@ -127,7 +128,8 @@ class RowIterator implements \Iterator
*
* @return Row
*/
public function current(): Row
#[\ReturnTypeWillChange]
public function current()
{
return new Row($this->subject, $this->position);
}
@@ -137,7 +139,8 @@ class RowIterator implements \Iterator
*
* @return int
*/
public function key(): int
#[\ReturnTypeWillChange]
public function key()
{
return $this->position;
}
@@ -145,7 +148,8 @@ class RowIterator implements \Iterator
/**
* Set the iterator to its next value.
*/
public function next(): void
#[\ReturnTypeWillChange]
public function next()
{
++$this->position;
}
@@ -163,7 +167,8 @@ class RowIterator implements \Iterator
*
* @return bool
*/
public function valid(): bool
#[\ReturnTypeWillChange]
public function valid()
{
return $this->position <= $this->endRow && $this->position >= $this->startRow;
}