Code Duplication    Length = 5-5 lines in 2 locations

includes/deferred/LinksDeletionUpdate.php 2 locations

@@ 85-89 (lines=5) @@
82
		$catBatches = array_chunk( $cats, $batchSize );
83
		foreach ( $catBatches as $catBatch ) {
84
			$this->page->updateCategoryCounts( [], $catBatch, $id );
85
			if ( count( $catBatches ) > 1 ) {
86
				$lbFactory->commitAndWaitForReplication(
87
					__METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ]
88
				);
89
			}
90
		}
91
92
		// Refresh the category table entry if it seems to have no pages. Check
@@ 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