Code Duplication    Length = 5-5 lines in 2 locations

includes/deferred/LinksDeletionUpdate.php 2 locations

@@ 90-94 (lines=5) @@
87
		$catBatches = array_chunk( $cats, $batchSize );
88
		foreach ( $catBatches as $catBatch ) {
89
			$this->page->updateCategoryCounts( [], $catBatch, $id );
90
			if ( count( $catBatches ) > 1 ) {
91
				$lbFactory->commitAndWaitForReplication(
92
					__METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
93
				);
94
			}
95
		}
96
97
		// Refresh the category table entry if it seems to have no pages. Check
@@ 187-191 (lines=5) @@
184
			$rcIdBatches = array_chunk( array_merge( $rcIdsForTitle, $rcIdsForPage ), $batchSize );
185
			foreach ( $rcIdBatches as $rcIdBatch ) {
186
				$dbw->delete( 'recentchanges', [ 'rc_id' => $rcIdBatch ], __METHOD__ );
187
				if ( count( $rcIdBatches ) > 1 ) {
188
					$lbFactory->commitAndWaitForReplication(
189
						__METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
190
					);
191
				}
192
			}
193
		}
194