Code Duplication    Length = 4-7 lines in 3 locations

apps/files_versions/lib/Expiration.php 2 locations

@@ 148-154 (lines=7) @@
145
146
		$isValid = true;
147
		// Validate
148
		if (!ctype_digit($minValue) && $minValue !== 'auto') {
149
			$isValid = false;
150
			\OC::$server->getLogger()->warning(
151
					$minValue . ' is not a valid value for minimal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.',
152
					['app'=>'files_versions']
153
			);
154
		}
155
156
		if (!ctype_digit($maxValue) && $maxValue !== 'auto') {
157
			$isValid = false;
@@ 156-162 (lines=7) @@
153
			);
154
		}
155
156
		if (!ctype_digit($maxValue) && $maxValue !== 'auto') {
157
			$isValid = false;
158
			\OC::$server->getLogger()->warning(
159
					$maxValue . ' is not a valid value for maximal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.',
160
					['app'=>'files_versions']
161
			);
162
		}
163
164
		if (!$isValid){
165
			$minValue = 'auto';

lib/private/legacy/app.php 1 location

@@ 247-250 (lines=4) @@
244
		} catch (Exception $ex) {
245
			\OC::$server->getLogger()->logException($ex);
246
			$blacklist = \OC::$server->getAppManager()->getAlwaysEnabledApps();
247
			if (!in_array($app, $blacklist)) {
248
				\OC::$server->getLogger()->warning('Could not load app "' . $app . '", it will be disabled', array('app' => 'core'));
249
				self::disable($app);
250
			}
251
			throw $ex;
252
		}
253
	}