Code Duplication    Length = 10-11 lines in 3 locations

lib/private/NavigationManager.php 3 locations

@@ 197-206 (lines=10) @@
194
		$this->init = true;
195
196
		$l = $this->l10nFac->get('lib');
197
		if ($this->config->getSystemValue('knowledgebaseenabled', true)) {
198
			$this->add([
199
				'type' => 'settings',
200
				'id' => 'help',
201
				'order' => 5,
202
				'href' => $this->urlGenerator->linkToRoute('settings_help'),
203
				'name' => $l->t('Help'),
204
				'icon' => $this->urlGenerator->imagePath('settings', 'help.svg'),
205
			]);
206
		}
207
208
		if ($this->userSession->isLoggedIn()) {
209
			if ($this->isAdmin()) {
@@ 209-219 (lines=11) @@
206
		}
207
208
		if ($this->userSession->isLoggedIn()) {
209
			if ($this->isAdmin()) {
210
				// App management
211
				$this->add([
212
					'type' => 'settings',
213
					'id' => 'core_apps',
214
					'order' => 3,
215
					'href' => $this->urlGenerator->linkToRoute('settings.AppSettings.viewApps'),
216
					'icon' => $this->urlGenerator->imagePath('settings', 'apps.svg'),
217
					'name' => $l->t('Apps'),
218
				]);
219
			}
220
221
			// Personal and (if applicable) admin settings
222
			$this->add([
@@ 244-254 (lines=11) @@
241
				]);
242
			}
243
244
			if ($this->isSubadmin()) {
245
				// User management
246
				$this->add([
247
					'type' => 'settings',
248
					'id' => 'core_users',
249
					'order' => 4,
250
					'href' => $this->urlGenerator->linkToRoute('settings_users'),
251
					'name' => $l->t('Users'),
252
					'icon' => $this->urlGenerator->imagePath('settings', 'users.svg'),
253
				]);
254
			}
255
		}
256
257
		if ($this->appManager === 'null') {