Code Duplication    Length = 2-2 lines in 2 locations

Sources/ManageServer.php 1 location

@@ 560-561 (lines=2) @@
557
		$modSettings['load_average'] = @file_get_contents('/proc/loadavg');
558
		if (!empty($modSettings['load_average']) && preg_match('~^([^ ]+?) ([^ ]+?) ([^ ]+)~', $modSettings['load_average'], $matches) !== 0)
559
			$modSettings['load_average'] = (float) $matches[1];
560
		elseif (($modSettings['load_average'] = @`uptime`) !== null && preg_match('~load averages?: (\d+\.\d+), (\d+\.\d+), (\d+\.\d+)~i', $modSettings['load_average'], $matches) !== 0)
561
			$modSettings['load_average'] = (float) $matches[1];
562
		else
563
			unset($modSettings['load_average']);
564

Sources/Load.php 1 location

@@ 253-254 (lines=2) @@
250
			$modSettings['load_average'] = @file_get_contents('/proc/loadavg');
251
			if (!empty($modSettings['load_average']) && preg_match('~^([^ ]+?) ([^ ]+?) ([^ ]+)~', $modSettings['load_average'], $matches) != 0)
252
				$modSettings['load_average'] = (float) $matches[1];
253
			elseif (($modSettings['load_average'] = @`uptime`) != null && preg_match('~load average[s]?: (\d+\.\d+), (\d+\.\d+), (\d+\.\d+)~i', $modSettings['load_average'], $matches) != 0)
254
				$modSettings['load_average'] = (float) $matches[1];
255
			else
256
				unset($modSettings['load_average']);
257