Skip to content

Commit d4349de

Browse files
authored
fix deprecation warnings on php8 by adding return types (#62)
1 parent 84889b4 commit d4349de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Presenter.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ protected function processKeys($attributes)
305305
* @param string $offset
306306
* @return bool
307307
*/
308-
public function offsetExists($offset)
308+
public function offsetExists($offset): bool
309309
{
310310
return $this->{$offset} !== null;
311311
}
@@ -316,7 +316,7 @@ public function offsetExists($offset)
316316
* @param string $offset
317317
* @return mixed
318318
*/
319-
public function offsetGet($offset)
319+
public function offsetGet($offset): mixed
320320
{
321321
return $this->{$offset};
322322
}
@@ -329,7 +329,7 @@ public function offsetGet($offset)
329329
*
330330
* @throws BadMethodCallException
331331
*/
332-
public function offsetSet($offset, $value)
332+
public function offsetSet($offset, $value): void
333333
{
334334
throw new BadMethodCallException('Hemp/Presenter does not support write methods');
335335
}
@@ -341,7 +341,7 @@ public function offsetSet($offset, $value)
341341
*
342342
* @throws BadMethodCallException
343343
*/
344-
public function offsetUnset($offset)
344+
public function offsetUnset($offset): void
345345
{
346346
throw new BadMethodCallException('Hemp/Presenter does not support write methods');
347347
}

0 commit comments

Comments
 (0)