Code Duplication    Length = 5-5 lines in 4 locations

lib/private/Settings/Manager.php 4 locations

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