Code Duplication    Length = 11-11 lines in 2 locations

maintenance/cleanupUploadStash.php 2 locations

@@ 103-113 (lines=11) @@
100
		$this->output( "Deleting old thumbnails...\n" );
101
		$i = 0;
102
		$batch = []; // operation batch
103
		foreach ( $iterator as $file ) {
104
			if ( wfTimestamp( TS_UNIX, $tempRepo->getFileTimestamp( "$dir/$file" ) ) < $cutoff ) {
105
				$batch[] = [ 'op' => 'delete', 'src' => "$dir/$file" ];
106
				if ( count( $batch ) >= $this->mBatchSize ) {
107
					$this->doOperations( $tempRepo, $batch );
108
					$i += count( $batch );
109
					$batch = [];
110
					$this->output( "$i\n" );
111
				}
112
			}
113
		}
114
		if ( count( $batch ) ) {
115
			$this->doOperations( $tempRepo, $batch );
116
			$i += count( $batch );
@@ 129-139 (lines=11) @@
126
		}
127
		$i = 0;
128
		$batch = []; // operation batch
129
		foreach ( $iterator as $file ) {
130
			if ( wfTimestamp( TS_UNIX, $tempRepo->getFileTimestamp( "$dir/$file" ) ) < $cutoff ) {
131
				$batch[] = [ 'op' => 'delete', 'src' => "$dir/$file" ];
132
				if ( count( $batch ) >= $this->mBatchSize ) {
133
					$this->doOperations( $tempRepo, $batch );
134
					$i += count( $batch );
135
					$batch = [];
136
					$this->output( "$i\n" );
137
				}
138
			}
139
		}
140
		if ( count( $batch ) ) {
141
			$this->doOperations( $tempRepo, $batch );
142
			$i += count( $batch );