Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 999-1010 (lines=12) @@
996
	 * @return Filter\FilterSelect
997
	 * @throws DataGridException
998
	 */
999
	public function addFilterSelect($key, $name, array $options, $column = NULL)
1000
	{
1001
		$column = $column ?: $key;
1002
1003
		if (!is_string($column)) {
1004
			throw new DataGridException("Filter Select can only filter in one column.");
1005
		}
1006
1007
		$this->addFilterCheck($key);
1008
1009
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
1010
	}
1011
1012
1013
	/**
@@ 1066-1077 (lines=12) @@
1063
	 * @return Filter\FilterRange
1064
	 * @throws DataGridException
1065
	 */
1066
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
1067
	{
1068
		$column = $column ?: $key;
1069
1070
		if (!is_string($column)) {
1071
			throw new DataGridException("FilterRange can only filter in one column.");
1072
		}
1073
1074
		$this->addFilterCheck($key);
1075
1076
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1077
	}
1078
1079
1080
	/**
@@ 1088-1099 (lines=12) @@
1085
	 * @return Filter\FilterDateRange
1086
	 * @throws DataGridException
1087
	 */
1088
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1089
	{
1090
		$column = $column ?: $key;
1091
1092
		if (!is_string($column)) {
1093
			throw new DataGridException("FilterDateRange can only filter in one column.");
1094
		}
1095
1096
		$this->addFilterCheck($key);
1097
1098
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1099
	}
1100
1101
1102
	/**