Code Duplication    Length = 5-5 lines in 2 locations

includes/deferred/LinksDeletionUpdate.php 2 locations

@@ 182-186 (lines=5) @@
179
		$rcIdBatches = array_chunk( array_merge( $rcIdsForTitle, $rcIdsForPage ), $batchSize );
180
		foreach ( $rcIdBatches as $rcIdBatch ) {
181
			$dbw->delete( 'recentchanges', [ 'rc_id' => $rcIdBatch ], __METHOD__ );
182
			if ( count( $rcIdBatches ) > 1 ) {
183
				$lbFactory->commitAndWaitForReplication(
184
					__METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
185
				);
186
			}
187
		}
188
189
		// Commit and release the lock (if set)
@@ 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