Code Duplication    Length = 5-5 lines in 2 locations

includes/filerepo/file/OldLocalFile.php 2 locations

@@ 185-189 (lines=5) @@
182
			: $this->repo->getSlaveDB();
183
184
		$conds = [ 'oi_name' => $this->getName() ];
185
		if ( is_null( $this->requestedTime ) ) {
186
			$conds['oi_archive_name'] = $this->archive_name;
187
		} else {
188
			$conds['oi_timestamp'] = $dbr->timestamp( $this->requestedTime );
189
		}
190
		$row = $dbr->selectRow( 'oldimage', $this->getCacheFields( 'oi_' ),
191
			$conds, __METHOD__, [ 'ORDER BY' => 'oi_timestamp DESC' ] );
192
		if ( $row ) {
@@ 206-210 (lines=5) @@
203
		$this->extraDataLoaded = true;
204
		$dbr = $this->repo->getSlaveDB();
205
		$conds = [ 'oi_name' => $this->getName() ];
206
		if ( is_null( $this->requestedTime ) ) {
207
			$conds['oi_archive_name'] = $this->archive_name;
208
		} else {
209
			$conds['oi_timestamp'] = $dbr->timestamp( $this->requestedTime );
210
		}
211
		// In theory the file could have just been renamed/deleted...oh well
212
		$row = $dbr->selectRow( 'oldimage', $this->getLazyCacheFields( 'oi_' ),
213
			$conds, __METHOD__, [ 'ORDER BY' => 'oi_timestamp DESC' ] );