Code Duplication    Length = 13-14 lines in 2 locations

lib/private/Encryption/Keys/Storage.php 2 locations

@@ 298-311 (lines=14) @@
295
	 * @param string $target
296
	 * @return boolean
297
	 */
298
	public function renameKeys($source, $target) {
299
300
		$sourcePath = $this->getPathToKeys($source);
301
		$targetPath = $this->getPathToKeys($target);
302
303
		if ($this->view->file_exists($sourcePath)) {
304
			$this->keySetPreparation(dirname($targetPath));
305
			$this->view->rename($sourcePath, $targetPath);
306
307
			return true;
308
		}
309
310
		return false;
311
	}
312
313
314
	/**
@@ 321-333 (lines=13) @@
318
	 * @param string $target
319
	 * @return boolean
320
	 */
321
	public function copyKeys($source, $target) {
322
323
		$sourcePath = $this->getPathToKeys($source);
324
		$targetPath = $this->getPathToKeys($target);
325
326
		if ($this->view->file_exists($sourcePath)) {
327
			$this->keySetPreparation(dirname($targetPath));
328
			$this->view->copy($sourcePath, $targetPath);
329
			return true;
330
		}
331
332
		return false;
333
	}
334
335
	/**
336
	 * get system wide path and detect mount points