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 in 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
	/**
@@ 1018-1029 (lines=12) @@
1015
	 * @return Filter\FilterRange
1016
	 * @throws DataGridException
1017
	 */
1018
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
1019
	{
1020
		$column = $column ?: $key;
1021
1022
		if (!is_string($column)) {
1023
			throw new DataGridException("FilterRange can only filter in one column.");
1024
		}
1025
1026
		$this->addFilterCheck($key);
1027
1028
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1029
	}
1030
1031
1032
	/**
@@ 1040-1051 (lines=12) @@
1037
	 * @return Filter\FilterDateRange
1038
	 * @throws DataGridException
1039
	 */
1040
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1041
	{
1042
		$column = $column ?: $key;
1043
1044
		if (!is_string($column)) {
1045
			throw new DataGridException("FilterDateRange can only filter in one column.");
1046
		}
1047
1048
		$this->addFilterCheck($key);
1049
1050
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1051
	}
1052
1053
1054
	/**