Code Duplication    Length = 14-14 lines in 2 locations

Sources/ManageServer.php 2 locations

@@ 709-722 (lines=14) @@
706
			);
707
708
			// Handle min/max/step if necessary
709
			if ($config_var[3] == 'int' || $config_var[3] == 'float')
710
			{
711
				// Default to a min of 0 if one isn't set
712
				if (isset($config_var['min']))
713
					$context['config_vars'][$config_var[0]]['min'] = $config_var['min'];
714
				else
715
					$context['config_vars'][$config_var[0]]['min'] = 0;
716
717
				if (isset($config_var['max']))
718
					$context['config_vars'][$config_var[0]]['max'] = $config_var['max'];
719
720
				if (isset($config_var['step']))
721
					$context['config_vars'][$config_var[0]]['step'] = $config_var['step'];
722
			}
723
724
			// If this is a select box handle any data.
725
			if (!empty($config_var[4]) && is_array($config_var[4]))
@@ 850-863 (lines=14) @@
847
			);
848
849
			// Handle min/max/step if necessary
850
			if ($config_var[0] == 'int' || $config_var[0] == 'float')
851
			{
852
				// Default to a min of 0 if one isn't set
853
				if (isset($config_var['min']))
854
					$context['config_vars'][$config_var[1]]['min'] = $config_var['min'];
855
				else
856
					$context['config_vars'][$config_var[1]]['min'] = 0;
857
858
				if (isset($config_var['max']))
859
					$context['config_vars'][$config_var[1]]['max'] = $config_var['max'];
860
861
				if (isset($config_var['step']))
862
					$context['config_vars'][$config_var[1]]['step'] = $config_var['step'];
863
			}
864
865
			// If this is a select box handle any data.
866
			if (!empty($config_var[2]) && is_array($config_var[2]))