From e93d1fd1b8b0dae24afc0a76f9f309d58a3b8abb Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 27 Oct 2022 19:04:31 +0300 Subject: [PATCH] toArray generic --- src/Client.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Client.php b/src/Client.php index 72b1d93a1b..8287701efa 100644 --- a/src/Client.php +++ b/src/Client.php @@ -2,6 +2,7 @@ namespace Utopia\Mongo; +use DateTime; use MongoDB\BSON; use Swoole\Client as SwooleClient; use Swoole\Coroutine\Client as CoroutineClient; @@ -694,11 +695,10 @@ class Client /** * Convert an object (stdClass) to an assoc array. * - * @param stdClass|array|string|null $obj - * + * @param mixed $obj * @return array|null */ - public function toArray(stdClass|array|string|null $obj): array|null + public function toArray(mixed $obj): ?array { if(\is_null($obj)) return null;