Code Duplication    Length = 14-14 lines in 2 locations

Sources/ManageServer.php 2 locations

@@ 738-751 (lines=14) @@
735
			);
736
737
			// Handle min/max/step if necessary
738
			if ($config_var[3] == 'int' || $config_var[3] == 'float')
739
			{
740
				// Default to a min of 0 if one isn't set
741
				if (isset($config_var['min']))
742
					$context['config_vars'][$config_var[0]]['min'] = $config_var['min'];
743
				else
744
					$context['config_vars'][$config_var[0]]['min'] = 0;
745
746
				if (isset($config_var['max']))
747
					$context['config_vars'][$config_var[0]]['max'] = $config_var['max'];
748
749
				if (isset($config_var['step']))
750
					$context['config_vars'][$config_var[0]]['step'] = $config_var['step'];
751
			}
752
753
			// If this is a select box handle any data.
754
			if (!empty($config_var[4]) && is_array($config_var[4]))
@@ 879-892 (lines=14) @@
876
			);
877
878
			// Handle min/max/step if necessary
879
			if ($config_var[0] == 'int' || $config_var[0] == 'float')
880
			{
881
				// Default to a min of 0 if one isn't set
882
				if (isset($config_var['min']))
883
					$context['config_vars'][$config_var[1]]['min'] = $config_var['min'];
884
				else
885
					$context['config_vars'][$config_var[1]]['min'] = 0;
886
887
				if (isset($config_var['max']))
888
					$context['config_vars'][$config_var[1]]['max'] = $config_var['max'];
889
890
				if (isset($config_var['step']))
891
					$context['config_vars'][$config_var[1]]['step'] = $config_var['step'];
892
			}
893
894
			// If this is a select box handle any data.
895
			if (!empty($config_var[2]) && is_array($config_var[2]))