Code Duplication    Length = 8-8 lines in 2 locations

lib/private/Files/Cache/Cache.php 2 locations

@@ 438-445 (lines=8) @@
435
	 *
436
	 * @param string $file
437
	 */
438
	public function remove($file) {
439
		$entry = $this->get($file);
440
		$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?';
441
		$this->connection->executeQuery($sql, array($entry['fileid']));
442
		if ($entry['mimetype'] === 'httpd/unix-directory') {
443
			$this->removeChildren($entry);
444
		}
445
	}
446
447
	/**
448
	 * Get all sub folders of a folder
@@ 466-473 (lines=8) @@
463
	 * @param array $entry the cache entry of the folder to remove the children of
464
	 * @throws \OC\DatabaseException
465
	 */
466
	private function removeChildren($entry) {
467
		$subFolders = $this->getSubFolders($entry);
468
		foreach ($subFolders as $folder) {
469
			$this->removeChildren($folder);
470
		}
471
		$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `parent` = ?';
472
		$this->connection->executeQuery($sql, array($entry['fileid']));
473
	}
474
475
	/**
476
	 * Move a file or folder in the cache