diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-13 08:07:08 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-13 08:07:08 +0100 |
commit | c8aee70a0b9d4f873a7327c13bb6b4763a6299a3 (patch) | |
tree | 352e071a4d4c5dd55a82d35afc60c94433133026 /lib/private | |
parent | 3cae27614932d3cb0780018551b14a4139f980fd (diff) | |
download | nextcloud-server-c8aee70a0b9d4f873a7327c13bb6b4763a6299a3.tar.gz nextcloud-server-c8aee70a0b9d4f873a7327c13bb6b4763a6299a3.zip |
Made select varadic
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/DB/QueryBuilder/QueryBuilder.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php index d6f8bb48acd..c15470dcda8 100644 --- a/lib/private/DB/QueryBuilder/QueryBuilder.php +++ b/lib/private/DB/QueryBuilder/QueryBuilder.php @@ -379,12 +379,14 @@ class QueryBuilder implements IQueryBuilder { * ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id'); * </code> * - * @param mixed $select The selection expressions. + * @param mixed ...$selects The selection expressions. * * @return \OCP\DB\QueryBuilder\IQueryBuilder This QueryBuilder instance. */ - public function select($select = null) { - $selects = is_array($select) ? $select : func_get_args(); + public function select(...$selects) { + if (count($selects) === 1 && is_array($selects[0])) { + $selects = $selects[0]; + } $this->queryBuilder->select( $this->helper->quoteColumnNames($selects) |