Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

V2 deprecation warnings #260

Merged
merged 2 commits into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.0, 7.4]
php: [8.1, 8.0, 7.4]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
Expand Down
11 changes: 7 additions & 4 deletions src/DataTransferObjectCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ public function __get($name)
}
}

#[\ReturnTypeWillChange]
public function current()
{
return $this->iterator->current();
}

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->iterator[$offset] ?? null;
}

public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->iterator[] = $value;
Expand All @@ -53,16 +55,17 @@ public function offsetExists($offset): bool
return $this->iterator->offsetExists($offset);
}

public function offsetUnset($offset)
public function offsetUnset($offset): void
{
unset($this->iterator[$offset]);
}

public function next()
public function next(): void
{
$this->iterator->next();
}

#[\ReturnTypeWillChange]
public function key()
{
return $this->iterator->key();
Expand All @@ -73,7 +76,7 @@ public function valid(): bool
return $this->iterator->valid();
}

public function rewind()
public function rewind(): void
{
$this->iterator->rewind();
}
Expand Down