Code Duplication    Length = 10-10 lines in 2 locations

lib/TokenManager.php 2 locations

@@ 118-127 (lines=10) @@
115
				// 1. No edit groups are set or
116
				// 2. if they are set, it is in one of the edit groups
117
				$editGroups = array_filter(explode('|', $this->appConfig->getAppValue('edit_groups')));
118
				if ($updatable && count($editGroups) > 0) {
119
					$updatable = false;
120
					foreach($editGroups as $editGroup) {
121
						 $editorGroup = \OC::$server->getGroupManager()->get($editGroup);
122
						 if ($editorGroup !== null && sizeof($editorGroup->searchUsers($editoruid)) > 0) {
123
							$updatable = true;
124
							break;
125
						 }
126
					}
127
				}
128
			} catch (\Exception $e) {
129
				throw $e;
130
			}
@@ 182-191 (lines=10) @@
179
		// 1. No edit groups are set or
180
		// 2. if they are set, it is in one of the edit groups
181
		$editGroups = array_filter(explode('|', $this->appConfig->getAppValue('edit_groups')));
182
		if ($updatable && count($editGroups) > 0) {
183
			$updatable = false;
184
			foreach($editGroups as $editGroup) {
185
				$editorGroup = \OC::$server->getGroupManager()->get($editGroup);
186
				if ($editorGroup !== null && sizeof($editorGroup->searchUsers($editoruid)) > 0) {
187
					$updatable = true;
188
					break;
189
				}
190
			}
191
		}
192
193
		$serverHost = $this->urlGenerator->getAbsoluteURL('/');
194