Code Duplication    Length = 9-9 lines in 3 locations

apps/files_sharing/lib/external/storage.php 1 location

@@ 135-143 (lines=9) @@
132
	 * @param \OC\Files\Storage\Storage $storage
133
	 * @return \OCA\Files_Sharing\External\Scanner
134
	 */
135
	public function getScanner($path = '', $storage = null) {
136
		if (!$storage) {
137
			$storage = $this;
138
		}
139
		if (!isset($this->scanner)) {
140
			$this->scanner = new Scanner($storage);
141
		}
142
		return $this->scanner;
143
	}
144
145
	/**
146
	 * check if a file or folder has been updated since $time

lib/private/files/objectstore/objectstorestorage.php 1 location

@@ 130-138 (lines=9) @@
127
	 * @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
128
	 * @return \OC\Files\ObjectStore\NoopScanner
129
	 */
130
	public function getScanner($path = '', $storage = null) {
131
		if (!$storage) {
132
			$storage = $this;
133
		}
134
		if (!isset($this->scanner)) {
135
			$this->scanner = new NoopScanner($storage);
136
		}
137
		return $this->scanner;
138
	}
139
140
	public function getId() {
141
		return $this->id;

lib/private/files/storage/common.php 1 location

@@ 322-330 (lines=9) @@
319
		return $this->cache;
320
	}
321
322
	public function getScanner($path = '', $storage = null) {
323
		if (!$storage) {
324
			$storage = $this;
325
		}
326
		if (!isset($this->scanner)) {
327
			$this->scanner = new Scanner($storage);
328
		}
329
		return $this->scanner;
330
	}
331
332
	public function getWatcher($path = '', $storage = null) {
333
		if (!$storage) {