Skip to content

Commit

Permalink
Backwards-compatible type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
neildaniels committed Dec 9, 2021
1 parent 991b4e1 commit 92dada6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Tmdb/Model/Common/GenericCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,22 +288,23 @@ public function sort(Closure $closure)
return $this;
}

public function offsetExists(mixed $offset): bool
public function offsetExists($offset): bool
{
return isset($this->data[$offset]);
}

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

public function offsetSet(mixed $offset, mixed $value): void
public function offsetSet($offset, $value): void
{
$this->data[$offset] = $value;
}

public function offsetUnset(mixed $offset): void
public function offsetUnset($offset): void
{
unset($this->data[$offset]);
}
Expand Down

0 comments on commit 92dada6

Please sign in to comment.