jenkins-bot has submitted this change and it was merged.

Change subject: Remove some MediaWiki dependencies on utils/BatchRow*
......................................................................


Remove some MediaWiki dependencies on utils/BatchRow*

Change-Id: I35279875891630157c651e6575770ca4607bc168
---
M includes/utils/BatchRowIterator.php
M includes/utils/BatchRowUpdate.php
2 files changed, 5 insertions(+), 12 deletions(-)

Approvals:
  Tim Starling: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/utils/BatchRowIterator.php 
b/includes/utils/BatchRowIterator.php
index 9fc2431..602587c 100644
--- a/includes/utils/BatchRowIterator.php
+++ b/includes/utils/BatchRowIterator.php
@@ -82,11 +82,11 @@
         * @param string|array $table      The name or names of the table to 
read from
         * @param string|array $primaryKey The name or names of the primary key 
columns
         * @param integer      $batchSize  The number of rows to fetch per 
iteration
-        * @throws MWException
+        * @throws InvalidArgumentException
         */
        public function __construct( IDatabase $db, $table, $primaryKey, 
$batchSize ) {
                if ( $batchSize < 1 ) {
-                       throw new MWException( 'Batch size must be at least 1 
row.' );
+                       throw new InvalidArgumentException( 'Batch size must be 
at least 1 row.' );
                }
                $this->db = $db;
                $this->table = $table;
@@ -97,7 +97,7 @@
        }
 
        /**
-        * @param array $condition Query conditions suitable for use with
+        * @param array $conditions Query conditions suitable for use with
         *  IDatabase::select
         */
        public function addConditions( array $conditions ) {
@@ -105,7 +105,7 @@
        }
 
        /**
-        * @param array $condition Query join conditions suitable for use
+        * @param array $conditions Query join conditions suitable for use
         *  with IDatabase::select
         */
        public function addJoinConditions( array $conditions ) {
diff --git a/includes/utils/BatchRowUpdate.php 
b/includes/utils/BatchRowUpdate.php
index 1e7eda8..39b65c3 100644
--- a/includes/utils/BatchRowUpdate.php
+++ b/includes/utils/BatchRowUpdate.php
@@ -112,15 +112,8 @@
         *
         * @param callable $output A callback taking a single string
         *  parameter to output
-        *
-        * @throws MWException
         */
-       public function setOutput( $output ) {
-               if ( !is_callable( $output ) ) {
-                       throw new MWException(
-                               'Provided $output param is required to be 
callable.'
-                       );
-               }
+       public function setOutput( callable $output ) {
                $this->output = $output;
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/314045
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I35279875891630157c651e6575770ca4607bc168
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Tim Starling <tstarl...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to