X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Futils%2FBatchRowUpdate.php;h=549ad41ba21b4b583300968c11bae24fb2abc117;hb=3a1f172a6a16981b1fce607262cd19a8c448b77b;hp=a4257a5346b98c0caa928a2507fafdd323fa84ee;hpb=f6b7ffab94a873f324e8d65cee909221d1651325;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/BatchRowUpdate.php b/includes/utils/BatchRowUpdate.php index a4257a5346..549ad41ba2 100644 --- a/includes/utils/BatchRowUpdate.php +++ b/includes/utils/BatchRowUpdate.php @@ -71,7 +71,9 @@ class BatchRowUpdate { * @param RowUpdateGenerator $generator Generates single row updates * based on the rows content */ - public function __construct( BatchRowIterator $reader, BatchRowWriter $writer, RowUpdateGenerator $generator ) { + public function __construct( + BatchRowIterator $reader, BatchRowWriter $writer, RowUpdateGenerator $generator + ) { $this->reader = $reader; $this->writer = $writer; $this->generator = $generator; @@ -84,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, - ); + ]; } }