Code Duplication    Length = 5-5 lines in 4 locations

lib/private/Settings/Manager.php 4 locations

@@ 171-175 (lines=5) @@
168
	public function onAppDisabled($appId) {
169
		$appInfo = \OC_App::getAppInfo($appId); // hello static legacy
170
171
		if (!empty($appInfo['settings'][IManager::KEY_ADMIN_SECTION])) {
172
			foreach ($appInfo['settings'][IManager::KEY_ADMIN_SECTION] as $className) {
173
				$this->mapper->remove(Mapper::TABLE_ADMIN_SECTIONS, trim($className, '\\'));
174
			}
175
		}
176
		if (!empty($appInfo['settings'][IManager::KEY_ADMIN_SETTINGS])) {
177
			foreach ($appInfo['settings'][IManager::KEY_ADMIN_SETTINGS] as $className) {
178
				$this->mapper->remove(Mapper::TABLE_ADMIN_SETTINGS, trim($className, '\\'));
@@ 176-180 (lines=5) @@
173
				$this->mapper->remove(Mapper::TABLE_ADMIN_SECTIONS, trim($className, '\\'));
174
			}
175
		}
176
		if (!empty($appInfo['settings'][IManager::KEY_ADMIN_SETTINGS])) {
177
			foreach ($appInfo['settings'][IManager::KEY_ADMIN_SETTINGS] as $className) {
178
				$this->mapper->remove(Mapper::TABLE_ADMIN_SETTINGS, trim($className, '\\'));
179
			}
180
		}
181
182
		if (!empty($appInfo['settings'][IManager::KEY_PERSONAL_SECTION])) {
183
			foreach ($appInfo['settings'][IManager::KEY_PERSONAL_SECTION] as $className) {
@@ 182-186 (lines=5) @@
179
			}
180
		}
181
182
		if (!empty($appInfo['settings'][IManager::KEY_PERSONAL_SECTION])) {
183
			foreach ($appInfo['settings'][IManager::KEY_PERSONAL_SECTION] as $className) {
184
				$this->mapper->remove(Mapper::TABLE_PERSONAL_SECTIONS, trim($className, '\\'));
185
			}
186
		}
187
		if (!empty($appInfo['settings'][IManager::KEY_PERSONAL_SETTINGS])) {
188
			foreach ($appInfo['settings'][IManager::KEY_PERSONAL_SETTINGS] as $className) {
189
				$this->mapper->remove(Mapper::TABLE_PERSONAL_SETTINGS, trim($className, '\\'));
@@ 187-191 (lines=5) @@
184
				$this->mapper->remove(Mapper::TABLE_PERSONAL_SECTIONS, trim($className, '\\'));
185
			}
186
		}
187
		if (!empty($appInfo['settings'][IManager::KEY_PERSONAL_SETTINGS])) {
188
			foreach ($appInfo['settings'][IManager::KEY_PERSONAL_SETTINGS] as $className) {
189
				$this->mapper->remove(Mapper::TABLE_PERSONAL_SETTINGS, trim($className, '\\'));
190
			}
191
		}
192
	}
193
194
	public function checkForOrphanedClassNames() {