Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 983-994 (lines=12) @@
980
	 * @return Filter\FilterSelect
981
	 * @throws DataGridException
982
	 */
983
	public function addFilterSelect($key, $name, array $options, $column = NULL)
984
	{
985
		$column = $column ?: $key;
986
987
		if (!is_string($column)) {
988
			throw new DataGridException("Filter Select can only filter in one column.");
989
		}
990
991
		$this->addFilterCheck($key);
992
993
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
994
	}
995
996
997
	/**
@@ 1050-1061 (lines=12) @@
1047
	 * @return Filter\FilterRange
1048
	 * @throws DataGridException
1049
	 */
1050
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
1051
	{
1052
		$column = $column ?: $key;
1053
1054
		if (!is_string($column)) {
1055
			throw new DataGridException("FilterRange can only filter in one column.");
1056
		}
1057
1058
		$this->addFilterCheck($key);
1059
1060
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1061
	}
1062
1063
1064
	/**
@@ 1072-1083 (lines=12) @@
1069
	 * @return Filter\FilterDateRange
1070
	 * @throws DataGridException
1071
	 */
1072
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1073
	{
1074
		$column = $column ?: $key;
1075
1076
		if (!is_string($column)) {
1077
			throw new DataGridException("FilterDateRange can only filter in one column.");
1078
		}
1079
1080
		$this->addFilterCheck($key);
1081
1082
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1083
	}
1084
1085
1086
	/**