Code Duplication    Length = 9-9 lines in 2 locations

apps/files_sharing/lib/External/Storage.php 1 location

@@ 145-153 (lines=9) @@
142
	 * @param \OC\Files\Storage\Storage $storage
143
	 * @return \OCA\Files_Sharing\External\Scanner
144
	 */
145
	public function getScanner($path = '', $storage = null) {
146
		if (!$storage) {
147
			$storage = $this;
148
		}
149
		if (!isset($this->scanner)) {
150
			$this->scanner = new Scanner($storage);
151
		}
152
		return $this->scanner;
153
	}
154
155
	/**
156
	 * check if a file or folder has been updated since $time

lib/private/Files/ObjectStore/ObjectStoreStorage.php 1 location

@@ 141-149 (lines=9) @@
138
	 * @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
139
	 * @return \OC\Files\ObjectStore\NoopScanner
140
	 */
141
	public function getScanner($path = '', $storage = null) {
142
		if (!$storage) {
143
			$storage = $this;
144
		}
145
		if (!isset($this->scanner)) {
146
			$this->scanner = new NoopScanner($storage);
147
		}
148
		return $this->scanner;
149
	}
150
151
	public function getId() {
152
		return $this->id;