Code Duplication    Length = 11-11 lines in 2 locations

lib/private/App/AppManager.php 2 locations

@@ 223-233 (lines=11) @@
220
	 * @param string $appId
221
	 * @throws AppPathNotFoundException
222
	 */
223
	public function enableApp($appId) {
224
		// Check if app exists
225
		$this->getAppPath($appId);
226
227
		$this->installedAppsCache[$appId] = 'yes';
228
		$this->appConfig->setValue($appId, 'enabled', 'yes');
229
		$this->dispatcher->dispatch(ManagerEvent::EVENT_APP_ENABLE, new ManagerEvent(
230
			ManagerEvent::EVENT_APP_ENABLE, $appId
231
		));
232
		$this->clearAppsCache();
233
	}
234
235
	/**
236
	 * Whether a list of types contains a protected app type
@@ 284-294 (lines=11) @@
281
	 * @param string $appId
282
	 * @throws \Exception if app can't be disabled
283
	 */
284
	public function disableApp($appId) {
285
		if ($this->isAlwaysEnabled($appId)) {
286
			throw new \Exception("$appId can't be disabled.");
287
		}
288
		unset($this->installedAppsCache[$appId]);
289
		$this->appConfig->setValue($appId, 'enabled', 'no');
290
		$this->dispatcher->dispatch(ManagerEvent::EVENT_APP_DISABLE, new ManagerEvent(
291
			ManagerEvent::EVENT_APP_DISABLE, $appId
292
		));
293
		$this->clearAppsCache();
294
	}
295
296
	/**
297
	 * Get the directory for the given app.