Code Duplication    Length = 5-5 lines in 2 locations

apps/dav/lib/connector/sabre/directory.php 1 location

@@ 205-209 (lines=5) @@
202
			throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located');
203
		}
204
205
		if ($info['mimetype'] == 'httpd/unix-directory') {
206
			$node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this->tree);
207
		} else {
208
			$node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info);
209
		}
210
		if ($this->tree) {
211
			$this->tree->cacheNode($node);
212
		}

apps/dav/lib/connector/sabre/objecttree.php 1 location

@@ 173-177 (lines=5) @@
170
			throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located');
171
		}
172
173
		if ($info->getType() === 'dir') {
174
			$node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this);
175
		} else {
176
			$node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info);
177
		}
178
179
		$this->cache[$path] = $node;
180
		return $node;