Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 951-962 (lines=12) @@
948
	 * @return Filter\FilterSelect
949
	 * @throws DataGridException
950
	 */
951
	public function addFilterSelect($key, $name, array $options, $column = NULL)
952
	{
953
		$column = $column ?: $key;
954
955
		if (!is_string($column)) {
956
			throw new DataGridException("Filter Select can only filter through one column.");
957
		}
958
959
		$this->addFilterCheck($key);
960
961
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
962
	}
963
964
965
	/**
@@ 995-1006 (lines=12) @@
992
	 * @return Filter\FilterRange
993
	 * @throws DataGridException
994
	 */
995
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
996
	{
997
		$column = $column ?: $key;
998
999
		if (!is_string($column)) {
1000
			throw new DataGridException("FilterRange can only filter through one column.");
1001
		}
1002
1003
		$this->addFilterCheck($key);
1004
1005
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1006
	}
1007
1008
1009
	/**
@@ 1017-1028 (lines=12) @@
1014
	 * @return Filter\FilterDateRange
1015
	 * @throws DataGridException
1016
	 */
1017
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1018
	{
1019
		$column = $column ?: $key;
1020
1021
		if (!is_string($column)) {
1022
			throw new DataGridException("FilterDateRange can only filter through one column.");
1023
		}
1024
1025
		$this->addFilterCheck($key);
1026
1027
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1028
	}
1029
1030
1031
	/**