Merge "Change 'editfont' default preference to 'monospace'"
[lhc/web/wiklou.git] / includes / utils / BatchRowUpdate.php
index 1e7eda8..f42b5a0 100644 (file)
@@ -64,9 +64,9 @@ class BatchRowUpdate {
        protected $output;
 
        /**
-        * @param BatchRowIterator   $reader    Iterator that returns an
+        * @param BatchRowIterator $reader Iterator that returns an
         *  array of database rows
-        * @param BatchRowWriter     $writer    Writer capable of pushing
+        * @param BatchRowWriter $writer Writer capable of pushing
         *  row updates to the database
         * @param RowUpdateGenerator $generator Generates single row updates
         *  based on the rows content
@@ -77,7 +77,7 @@ class BatchRowUpdate {
                $this->reader = $reader;
                $this->writer = $writer;
                $this->generator = $generator;
-               $this->output = function() {
+               $this->output = function () {
                }; // nop
        }
 
@@ -112,15 +112,8 @@ class BatchRowUpdate {
         *
         * @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;
        }