Code Duplication    Length = 7-7 lines in 2 locations

lib/Service/FileService.php 2 locations

@@ 271-277 (lines=7) @@
268
				$filePath = substr_replace ( $filePath, '', $pos, strlen ( '/' ) ); // '/' => '' || '/Test/' => 'Test'
269
			}
270
			
271
			if ($fileInfo->getMimetype () === FileService::$MIMETYPE_PDF) {
272
				// PDFs:
273
				return \OCP\Files::buildNotExistingFileName ( $filePath, $fileName . '_OCR.pdf' );
274
			} else {
275
				// IMAGES:
276
				return \OCP\Files::buildNotExistingFileName ( $filePath, $fileName . '_OCR.txt' );
277
			}
278
		} catch ( Exception $e ) {
279
			$this->handleException ( $e );
280
		}
@@ 313-319 (lines=7) @@
310
				$filePath = substr_replace ( $filePath, '', $pos, strlen ( '/' ) ); // '/Test' => '// 'Test' || '/' => ''
311
			}
312
			
313
			if ($fileInfo->getMimetype () === FileService::$MIMETYPE_PDF) {
314
				// PDFs:
315
				return \OCP\Files::buildNotExistingFileName ( $filePath, $fileName . '_OCR.pdf' );
316
			} else {
317
				// IMAGES:
318
				return \OCP\Files::buildNotExistingFileName ( $filePath, $fileName . '_OCR.txt' );
319
			}
320
		} catch ( Exception $e ) {
321
			$this->handleException ( $e );
322
		}