Code Duplication    Length = 10-10 lines in 2 locations

lib/private/Authentication/TwoFactorAuth/Manager.php 1 location

@@ 114-123 (lines=10) @@
111
			$info = $this->appManager->getAppInfo($appId);
112
			if (isset($info['two-factor-providers'])) {
113
				$providerClasses = $info['two-factor-providers'];
114
				foreach ($providerClasses as $class) {
115
					try {
116
						$this->loadTwoFactorApp($appId);
117
						$provider = OC::$server->query($class);
118
						$providers[$provider->getId()] = $provider;
119
					} catch (QueryException $exc) {
120
						// Provider class can not be resolved
121
						throw new Exception("Could not load two-factor auth provider $class");
122
					}
123
				}
124
			}
125
		}
126

lib/private/Settings/Manager.php 1 location

@@ 117-126 (lines=10) @@
114
115
	public function checkForOrphanedClassNames() {
116
		$tables = [ self::TABLE_ADMIN_SECTIONS, self::TABLE_ADMIN_SETTINGS ];
117
		foreach ($tables as $table) {
118
			$classes = $this->getClasses($table);
119
			foreach($classes as $className) {
120
				try {
121
					\OC::$server->query($className);
122
				} catch (QueryException $e) {
123
					$this->remove($table, $className);
124
				}
125
			}
126
		}
127
	}
128
129
	/**