X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Futils%2FBatchRowUpdate.php;h=1e7eda8b6349508d5bfb8cdc660a6e149d42f3ba;hb=59fa0ccc6f96dc22f7a994f81cedf8169016f940;hp=e739be347889ca9f7a6c9448f37ee9bb66959b3a;hpb=6cd232ebfe4b55612fe774f0127339a11626230b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/BatchRowUpdate.php b/includes/utils/BatchRowUpdate.php index e739be3478..1e7eda8b63 100644 --- a/includes/utils/BatchRowUpdate.php +++ b/includes/utils/BatchRowUpdate.php @@ -4,7 +4,7 @@ * method of batch updating rows in a database. To use create a class * implementing the RowUpdateGenerator interface and configure the * BatchRowIterator and BatchRowWriter for access to the correct table. - * The components will handle reading, writing, and waiting for slaves + * The components will handle reading, writing, and waiting for replica DBs * while the generator implementation handles generating update arrays * for singular rows. * @@ -86,14 +86,14 @@ class BatchRowUpdate { */ public function execute() { foreach ( $this->reader as $rows ) { - $updates = array(); + $updates = []; foreach ( $rows as $row ) { $update = $this->generator->update( $row ); if ( $update ) { - $updates[] = array( + $updates[] = [ 'primaryKey' => $this->reader->extractPrimaryKeys( $row ), 'changes' => $update, - ); + ]; } }