Code Duplication    Length = 9-11 lines in 2 locations

lib/private/Files/Storage/Home.php 1 location

@@ 79-87 (lines=9) @@
76
	 * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
77
	 * @return \OC\Files\Cache\Propagator
78
	 */
79
	public function getPropagator($storage = null) {
80
		if (!$storage) {
81
			$storage = $this;
82
		}
83
		if (!isset($this->propagator)) {
84
			$this->propagator = new HomePropagator($storage, \OC::$server->getDatabaseConnection());
85
		}
86
		return $this->propagator;
87
	}
88
89
	/**
90
	 * Returns the owner of this home storage

apps/files_sharing/lib/SharedStorage.php 1 location

@@ 344-354 (lines=11) @@
341
		return new \OCA\Files_Sharing\Scanner($storage);
342
	}
343
344
	public function getPropagator($storage = null) {
345
		if (isset($this->propagator)) {
346
			return $this->propagator;
347
		}
348
349
		if (!$storage) {
350
			$storage = $this;
351
		}
352
		$this->propagator = new \OCA\Files_Sharing\SharedPropagator($storage, \OC::$server->getDatabaseConnection());
353
		return $this->propagator;
354
	}
355
356
	public function getOwner($path) {
357
		return $this->superShare->getShareOwner();