Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -213,7 +213,7 @@ public function __destruct()
$this->dataSource->close();
}

public function rewind()
public function rewind(): void
{
if (0 == $this->currentLine) {
$this->currentLine = 1;
Expand All @@ -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();
}
Expand Down