Code Duplication    Length = 8-8 lines in 2 locations

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

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