From 4dc55fd772c20ee6a6a6b360f9cc04c6620b9bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 20 Sep 2022 11:17:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Command.php | 42 +++++++++++++++++++++--------------------- Db.php | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Command.php b/Command.php index 8cd594a..ca5a8b8 100644 --- a/Command.php +++ b/Command.php @@ -40,65 +40,65 @@ class Command extends Component /** - * @return array|bool|int|string|PDOStatement|null + * @return mixed * @throws Exception */ - public function incrOrDecr(): array|bool|int|string|PDOStatement|null + public function incrOrDecr(): mixed { return $this->execute(static::EXECUTE); } /** - * @return int|bool|array|string|null + * @return mixed * @throws Exception */ - public function save(): int|bool|array|string|null + public function save(): mixed { return $this->execute(static::EXECUTE); } /** - * @return int|bool|array|string|null + * @return mixed * @throws Exception */ - public function all(): int|bool|array|string|null + public function all(): mixed { return $this->execute(static::FETCH_ALL); } /** - * @return array|bool|int|string|null + * @return mixed * @throws Exception */ - public function one(): null|array|bool|int|string + public function one(): mixed { return $this->execute(static::FETCH); } /** - * @return int|bool|array|string|null + * @return mixed * @throws Exception */ - public function fetchColumn(): int|bool|array|string|null + public function fetchColumn(): mixed { return $this->execute(static::FETCH_COLUMN); } /** - * @return int|bool|array|string|null + * @return mixed * @throws Exception */ - public function rowCount(): int|bool|array|string|null + public function rowCount(): mixed { return $this->execute(static::ROW_COUNT); } /** - * @return int|bool|array|string|null + * @return mixed * @throws Exception */ - public function flush(): int|bool|array|string|null + public function flush(): mixed { return $this->execute(static::EXECUTE); } @@ -106,10 +106,10 @@ class Command extends Component /** * @param string $type - * @return int|bool|array|string|null + * @return mixed * @throws Exception */ - private function execute(string $type): int|bool|array|string|null + private function execute(string $type): mixed { $time = microtime(true); @@ -154,7 +154,7 @@ class Command extends Component * @return array|int|bool|null * @throws Exception */ - private function search(string $type): array|int|bool|null + private function search(string $type): mixed { $pdo = $this->db->getSlaveClient(); try { @@ -169,19 +169,19 @@ class Command extends Component /** - * @return int|bool|array|string|null + * @return mixed * @throws Exception */ - public function delete(): int|bool|array|string|null + public function delete(): mixed { return $this->execute(static::EXECUTE); } /** - * @return int|bool|array|string|null + * @return mixed * @throws Exception */ - public function exec(): int|bool|array|string|null + public function exec(): mixed { return $this->execute(static::EXECUTE); } diff --git a/Db.php b/Db.php index dbb873a..4aaa825 100644 --- a/Db.php +++ b/Db.php @@ -305,11 +305,11 @@ class Db implements ISqlBuilder /** * @param string $table * @param Connection|NULL $connection - * @return bool|int|null + * @return mixed * @throws ConfigException * @throws Exception */ - public static function desc(string $table, Connection $connection = NULL): bool|int|null + public static function desc(string $table, Connection $connection = NULL): mixed { $connection = static::getDefaultConnection($connection);