Skip to content

Commit

Permalink
fix deprecation warnings on php8 by adding return types (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
zappzerapp authored Jan 5, 2023
1 parent 84889b4 commit d4349de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Presenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ protected function processKeys($attributes)
* @param string $offset
* @return bool
*/
public function offsetExists($offset)
public function offsetExists($offset): bool
{
return $this->{$offset} !== null;
}
Expand All @@ -316,7 +316,7 @@ public function offsetExists($offset)
* @param string $offset
* @return mixed
*/
public function offsetGet($offset)
public function offsetGet($offset): mixed
{
return $this->{$offset};
}
Expand All @@ -329,7 +329,7 @@ public function offsetGet($offset)
*
* @throws BadMethodCallException
*/
public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
throw new BadMethodCallException('Hemp/Presenter does not support write methods');
}
Expand All @@ -341,7 +341,7 @@ public function offsetSet($offset, $value)
*
* @throws BadMethodCallException
*/
public function offsetUnset($offset)
public function offsetUnset($offset): void
{
throw new BadMethodCallException('Hemp/Presenter does not support write methods');
}
Expand Down

0 comments on commit d4349de

Please sign in to comment.