Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 1052-1063 (lines=12) @@
1049
	 * @return Filter\FilterSelect
1050
	 * @throws DataGridException
1051
	 */
1052
	public function addFilterSelect($key, $name, array $options, $column = NULL)
1053
	{
1054
		$column = $column ?: $key;
1055
1056
		if (!is_string($column)) {
1057
			throw new DataGridException("Filter Select can only filter in one column.");
1058
		}
1059
1060
		$this->addFilterCheck($key);
1061
1062
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
1063
	}
1064
1065
1066
	/**
@@ 1119-1130 (lines=12) @@
1116
	 * @return Filter\FilterRange
1117
	 * @throws DataGridException
1118
	 */
1119
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
1120
	{
1121
		$column = $column ?: $key;
1122
1123
		if (!is_string($column)) {
1124
			throw new DataGridException("FilterRange can only filter in one column.");
1125
		}
1126
1127
		$this->addFilterCheck($key);
1128
1129
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1130
	}
1131
1132
1133
	/**
@@ 1141-1152 (lines=12) @@
1138
	 * @return Filter\FilterDateRange
1139
	 * @throws DataGridException
1140
	 */
1141
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1142
	{
1143
		$column = $column ?: $key;
1144
1145
		if (!is_string($column)) {
1146
			throw new DataGridException("FilterDateRange can only filter in one column.");
1147
		}
1148
1149
		$this->addFilterCheck($key);
1150
1151
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1152
	}
1153
1154
1155
	/**