From fd5b2d6af25dedb7027f92be7de0420bc498d7ad Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 16 Dec 2019 08:49:01 -0500 Subject: [PATCH] Fix wrong type-hints for table parameter in Database->selectToArray and DBA::selectToArray --- src/Database/DBA.php | 8 ++++---- src/Database/Database.php | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 6f746ff647..befb65bf9a 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -334,9 +334,9 @@ class DBA extends BaseObject /** * @brief Delete a row from a table * - * @param string $table Table name - * @param array $conditions Field condition(s) - * @param array $options + * @param string|array $table Table name + * @param array $conditions Field condition(s) + * @param array $options * - cascade: If true we delete records in other tables that depend on the one we're deleting through * relations (default: true) * @@ -411,7 +411,7 @@ class DBA extends BaseObject * @throws \Exception * @see self::select */ - public static function selectToArray(string $table, array $fields = [], array $condition = [], array $params = []) + public static function selectToArray($table, array $fields = [], array $condition = [], array $params = []) { return self::getClass(Database::class)->selectToArray($table, $fields, $condition, $params); } diff --git a/src/Database/Database.php b/src/Database/Database.php index 72ce6bbe6c..1dd3524ed6 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -1377,10 +1377,10 @@ class Database * * @brief Retrieve a single record from a table * - * @param string $table - * @param array $fields - * @param array $condition - * @param array $params + * @param string|array $table + * @param array $fields + * @param array $condition + * @param array $params * * @return bool|array * @throws \Exception @@ -1412,7 +1412,7 @@ class Database * @throws \Exception * @see self::select */ - public function selectToArray(string $table, array $fields = [], array $condition = [], array $params = []) + public function selectToArray($table, array $fields = [], array $condition = [], array $params = []) { return $this->toArray($this->select($table, $fields, $condition, $params)); }