Skip to content

Commit b8a4e94

Browse files
committed
- should be compatible with JsonSerializable::jsonSerialize(): mixed signature
- adds strict_types
1 parent 9b57c0e commit b8a4e94

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

AccessorTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare(strict_types=1);
22

33
/*
44
* This file is part of the Koded package.
@@ -22,7 +22,7 @@
2222
*/
2323
trait AccessorTrait
2424
{
25-
public function & __get($index)
25+
public function &__get($index)
2626
{
2727
if (false === array_key_exists($index, $this->storage)) {
2828
$this->storage[$index] = null;
@@ -87,7 +87,7 @@ public function getIterator(): Traversable
8787
}
8888
}
8989

90-
public function jsonSerialize(): array
90+
public function jsonSerialize(): mixed
9191
{
9292
return $this->storage;
9393
}

0 commit comments

Comments
 (0)