Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 1037-1048 (lines=12) @@
1034
	 * @return Filter\FilterSelect
1035
	 * @throws DataGridException
1036
	 */
1037
	public function addFilterSelect($key, $name, array $options, $column = NULL)
1038
	{
1039
		$column = $column ?: $key;
1040
1041
		if (!is_string($column)) {
1042
			throw new DataGridException("Filter Select can only filter in one column.");
1043
		}
1044
1045
		$this->addFilterCheck($key);
1046
1047
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
1048
	}
1049
1050
1051
	/**
@@ 1104-1115 (lines=12) @@
1101
	 * @return Filter\FilterRange
1102
	 * @throws DataGridException
1103
	 */
1104
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
1105
	{
1106
		$column = $column ?: $key;
1107
1108
		if (!is_string($column)) {
1109
			throw new DataGridException("FilterRange can only filter in one column.");
1110
		}
1111
1112
		$this->addFilterCheck($key);
1113
1114
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1115
	}
1116
1117
1118
	/**
@@ 1126-1137 (lines=12) @@
1123
	 * @return Filter\FilterDateRange
1124
	 * @throws DataGridException
1125
	 */
1126
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1127
	{
1128
		$column = $column ?: $key;
1129
1130
		if (!is_string($column)) {
1131
			throw new DataGridException("FilterDateRange can only filter in one column.");
1132
		}
1133
1134
		$this->addFilterCheck($key);
1135
1136
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1137
	}
1138
1139
1140
	/**