Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

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