Skip to content

Commit

Permalink
Update ExceptionNormalizer.php
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed May 15, 2024
1 parent ea9974e commit 8ec3c11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/serializer/src/ExceptionNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace Hyperf\Serializer;

use ArrayObject;
use Doctrine\Instantiator\Instantiator;
use Hyperf\Di\ReflectionManager;
use Hyperf\Serializer\Contract\CacheableSupportsMethodInterface;
Expand Down Expand Up @@ -73,7 +74,7 @@ public function supportsDenormalization($data, $type, $format = null)
return class_exists($type) && is_a($type, Throwable::class, true);
}

public function normalize($object, ?string $format = null, array $context = [])
public function normalize($object, ?string $format = null, array $context = []): null|array|ArrayObject|bool|float|int|string
{
if ($object instanceof Serializable) {
return serialize($object);
Expand Down

0 comments on commit 8ec3c11

Please sign in to comment.