Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 990-1001 (lines=12) @@
987
	 * @return Filter\FilterSelect
988
	 * @throws DataGridException
989
	 */
990
	public function addFilterSelect($key, $name, array $options, $column = NULL)
991
	{
992
		$column = $column ?: $key;
993
994
		if (!is_string($column)) {
995
			throw new DataGridException("Filter Select can only filter in one column.");
996
		}
997
998
		$this->addFilterCheck($key);
999
1000
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
1001
	}
1002
1003
1004
	/**
@@ 1057-1068 (lines=12) @@
1054
	 * @return Filter\FilterRange
1055
	 * @throws DataGridException
1056
	 */
1057
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
1058
	{
1059
		$column = $column ?: $key;
1060
1061
		if (!is_string($column)) {
1062
			throw new DataGridException("FilterRange can only filter in one column.");
1063
		}
1064
1065
		$this->addFilterCheck($key);
1066
1067
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1068
	}
1069
1070
1071
	/**
@@ 1079-1090 (lines=12) @@
1076
	 * @return Filter\FilterDateRange
1077
	 * @throws DataGridException
1078
	 */
1079
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1080
	{
1081
		$column = $column ?: $key;
1082
1083
		if (!is_string($column)) {
1084
			throw new DataGridException("FilterDateRange can only filter in one column.");
1085
		}
1086
1087
		$this->addFilterCheck($key);
1088
1089
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1090
	}
1091
1092
1093
	/**