Merge "Rename autonym for 'no' from 'norsk bokmål' to 'norsk'"
[lhc/web/wiklou.git] / includes / utils / BatchRowIterator.php
index ef2c14a..cab6a3d 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use Wikimedia\Rdbms\IDatabase;
+
 /**
  * Allows iterating a large number of rows in batches transparently.
  * By default when iterated over returns the full query result as an
@@ -84,9 +87,9 @@ class BatchRowIterator implements RecursiveIterator {
 
        /**
         * @param IDatabase $db The database to read from
-        * @param string|array $table      The name or names of the table to read from
+        * @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
+        * @param integer $batchSize The number of rows to fetch per iteration
         * @throws InvalidArgumentException
         */
        public function __construct( IDatabase $db, $table, $primaryKey, $batchSize ) {
@@ -230,7 +233,7 @@ class BatchRowIterator implements RecursiveIterator {
         * `=` conditions while the final key uses a `>` condition
         *
         * Example output:
-        *        [ '( foo = 42 AND bar > 7 ) OR ( foo > 42 )' ]
+        *     [ '( foo = 42 AND bar > 7 ) OR ( foo > 42 )' ]
         *
         * @return array The SQL conditions necessary to select the next set
         *  of rows in the batched query