Skip to content

Commit

Permalink
Merge pull request #23 from flownative/bugfix/php74-compatibility
Browse files Browse the repository at this point in the history
Remove type declaration using union type
  • Loading branch information
kdambekalns committed Oct 5, 2023
2 parents e8eb0d5 + 1492370 commit 8fdf1c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/RepresentationSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public function __construct(Options $options, int $maxDepth = 3, ?string $mbDete
$this->maxDepth = $maxDepth;
}

protected function serializeObject($object, int $_depth = 0, array $hashes = []): array|float|bool|int|string|null
/**
* @return array|float|bool|int|string|null
*/
protected function serializeObject($object, int $_depth = 0, array $hashes = [])
{
if ($_depth >= $this->maxDepth || \in_array(spl_object_hash($object), $hashes, true)) {
return $this->serializeValue($object);
Expand Down

0 comments on commit 8fdf1c8

Please sign in to comment.