Code Duplication    Length = 13-15 lines in 2 locations

Html/Select.php 2 locations

@@ 310-324 (lines=15) @@
307
		// Set default options
308
		$options = array_merge(self::$formatOptions, array('format.depth' => 0, 'option.format' => '', 'id' => null));
309
310
		if (is_array($attribs) && func_num_args() == 5)
311
		{
312
			// Assume we have an options array
313
			$options = array_merge($options, $attribs);
314
315
			// Extract the format and remove it from downstream options
316
			$format = $options['option.format'];
317
			unset($options['option.format']);
318
		}
319
		else
320
		{
321
			// Get options from the parameters
322
			$options['list.attr'] = $attribs;
323
			$options['list.select'] = $selected;
324
		}
325
326
		$start = (int) $start;
327
		$end   = (int) $end;
@@ 478-490 (lines=13) @@
475
			array('format.depth' => 0, 'groups' => true, 'list.select' => null, 'list.translate' => false)
476
		);
477
478
		if (is_array($optKey))
479
		{
480
			// Set default options and overwrite with anything passed in
481
			$options = array_merge($options, $optKey);
482
		}
483
		else
484
		{
485
			// Get options from the parameters
486
			$options['option.key'] = $optKey;
487
			$options['option.text'] = $optText;
488
			$options['list.select'] = $selected;
489
			$options['list.translate'] = $translate;
490
		}
491
492
		$html = '';
493
		$baseIndent = str_repeat($options['format.indent'], $options['format.depth']);