Code Duplication    Length = 4-4 lines in 4 locations

Field/FileList.php 2 locations

@@ 64-67 (lines=4) @@
61
		}
62
63
		// Prepend some default options based on field attributes.
64
		if (!$hideNone)
65
		{
66
			$options[] = HtmlSelect::option('-1', Text::alt('JOPTION_DO_NOT_USE', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
67
		}
68
69
		if (!$hideDefault)
70
		{
@@ 69-72 (lines=4) @@
66
			$options[] = HtmlSelect::option('-1', Text::alt('JOPTION_DO_NOT_USE', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
67
		}
68
69
		if (!$hideDefault)
70
		{
71
			$options[] = HtmlSelect::option('', Text::alt('JOPTION_USE_DEFAULT', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
72
		}
73
74
		// Get a list of files in the search path with the given filter.
75
		$files = Folder::files($path, $filter);

Field/FolderList.php 2 locations

@@ 59-62 (lines=4) @@
56
		}
57
58
		// Prepend some default options based on field attributes.
59
		if (!$hideNone)
60
		{
61
			$options[] = HtmlSelect::option('-1', Text::alt('JOPTION_DO_NOT_USE', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
62
		}
63
64
		if (!$hideDefault)
65
		{
@@ 64-67 (lines=4) @@
61
			$options[] = HtmlSelect::option('-1', Text::alt('JOPTION_DO_NOT_USE', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
62
		}
63
64
		if (!$hideDefault)
65
		{
66
			$options[] = HtmlSelect::option('', Text::alt('JOPTION_USE_DEFAULT', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
67
		}
68
69
		// Get a list of folders in the search path with the given filter.
70
		$folders = Folder::folders($path, $filter);