Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 945-956 (lines=12) @@
942
	 * @return Filter\FilterSelect
943
	 * @throws DataGridException
944
	 */
945
	public function addFilterSelect($key, $name, array $options, $column = NULL)
946
	{
947
		$column = $column ?: $key;
948
949
		if (!is_string($column)) {
950
			throw new DataGridException("Filter Select can only filter through one column.");
951
		}
952
953
		$this->addFilterCheck($key);
954
955
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
956
	}
957
958
959
	/**
@@ 989-1000 (lines=12) @@
986
	 * @return Filter\FilterRange
987
	 * @throws DataGridException
988
	 */
989
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
990
	{
991
		$column = $column ?: $key;
992
993
		if (!is_string($column)) {
994
			throw new DataGridException("FilterRange can only filter through one column.");
995
		}
996
997
		$this->addFilterCheck($key);
998
999
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1000
	}
1001
1002
1003
	/**
@@ 1011-1022 (lines=12) @@
1008
	 * @return Filter\FilterDateRange
1009
	 * @throws DataGridException
1010
	 */
1011
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1012
	{
1013
		$column = $column ?: $key;
1014
1015
		if (!is_string($column)) {
1016
			throw new DataGridException("FilterDateRange can only filter through one column.");
1017
		}
1018
1019
		$this->addFilterCheck($key);
1020
1021
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1022
	}
1023
1024
1025
	/**