Code Duplication    Length = 5-5 lines in 2 locations

apps/dav/lib/Connector/Sabre/File.php 2 locations

@@ 276-280 (lines=5) @@
273
		}
274
275
		$afterEvent = new GenericEvent(null, ['path' => $path]);
276
		if ($newFile === true) {
277
			\OC::$server->getEventDispatcher()->dispatch('file.aftercreate', $afterEvent);
278
		} else {
279
			\OC::$server->getEventDispatcher()->dispatch('file.afterupdate', $afterEvent);
280
		}
281
		return '"' . $this->info->getEtag() . '"';
282
	}
283
@@ 568-572 (lines=5) @@
565
				$etag = $info->getEtag();
566
				if ($etag !== null) {
567
					$afterEvent = new GenericEvent(null, ['path' => $absPath]);
568
					if ($newFile === true) {
569
						\OC::$server->getEventDispatcher()->dispatch('file.aftercreate', $afterEvent);
570
					} else {
571
						\OC::$server->getEventDispatcher()->dispatch('file.afterupdate', $afterEvent);
572
					}
573
				}
574
				return $etag;
575
			} catch (\Exception $e) {