From 7ddef4401284feb6b27943ecc1046d8c4da769ac Mon Sep 17 00:00:00 2001 From: Mathis Burger Date: Mon, 26 Sep 2022 14:09:23 +0200 Subject: [PATCH] [TASK] Updated return types --- src/SurrealDriver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SurrealDriver.php b/src/SurrealDriver.php index 3615b35..706deb5 100644 --- a/src/SurrealDriver.php +++ b/src/SurrealDriver.php @@ -56,11 +56,11 @@ public function useDatabase(string $namespace, string $database): void * @param string $thing The name of the thing in the database * @param array $data The data of the entity * - * @return mixed The created entity as result + * @return null The created entity as result * * @throws BadOpcodeException If the websocket connection failed */ - public function create(string $thing, array $data): mixed + public function create(string $thing, array $data): array { return $this->send('create', [$thing, $data])['result']; } @@ -74,7 +74,7 @@ public function create(string $thing, array $data): mixed * * @throws BadOpcodeException If the websocket connection failed */ - public function select(string $what): mixed + public function select(string $what): array { return $this->send('select', [$what])['result']; }