From 0f0b67047d0d3c3b7c662898527e1317cf9e17a9 Mon Sep 17 00:00:00 2001 From: Erik Bernhardson Date: Tue, 14 Feb 2017 15:41:19 -0800 Subject: [PATCH] Mark ApiQueryBase methods accepting arrays These particular functions build up data to be passed into the database abstraction, which accepts not only strings but arrays. Where conditions generate `field IN ('a', 'b', 'c')` clauses. The options can be used with, for example, sort to sort by one field and then a second. Change-Id: I743f14f0e56c7f0546dfecd130925e15d63c7d64 --- includes/api/ApiQueryBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 281fb61eb7..2d218652e9 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -258,7 +258,7 @@ abstract class ApiQueryBase extends ApiBase { /** * Equivalent to addWhere(array($field => $value)) * @param string $field Field name - * @param string $value Value; ignored if null or empty array; + * @param string|string[] $value Value; ignored if null or empty array; */ protected function addWhereFld( $field, $value ) { // Use count() to its full documented capabilities to simultaneously @@ -325,7 +325,7 @@ abstract class ApiQueryBase extends ApiBase { * Add an option such as LIMIT or USE INDEX. If an option was set * before, the old value will be overwritten * @param string $name Option name - * @param string $value Option value + * @param string|string[] $value Option value */ protected function addOption( $name, $value = null ) { if ( is_null( $value ) ) { -- 2.20.1