Code Duplication    Length = 6-7 lines in 2 locations

apps/dav/lib/DAV/Sharing/Backend.php 2 locations

@@ 60-66 (lines=7) @@
57
	 * @param string[] $remove
58
	 */
59
	public function updateShares($shareable, $add, $remove) {
60
		foreach($add as $element) {
61
			$principal = $this->principalBackend->findByUri($element['href'], '');
62
			if ($principal !== '') {
63
				$this->shareWith($shareable, $element);
64
			}
65
66
		}
67
		foreach($remove as $element) {
68
			$principal = $this->principalBackend->findByUri($element, '');
69
			if ($principal !== '') {
@@ 67-72 (lines=6) @@
64
			}
65
66
		}
67
		foreach($remove as $element) {
68
			$principal = $this->principalBackend->findByUri($element, '');
69
			if ($principal !== '') {
70
				$this->unshare($shareable, $element);
71
			}
72
		}
73
	}
74
75
	/**