Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 870-881 (lines=12) @@
867
	 * @return Filter\FilterSelect
868
	 * @throws DataGridException
869
	 */
870
	public function addFilterSelect($key, $name, $options, $column = NULL)
871
	{
872
		$column = $column ?: $key;
873
874
		if (!is_string($column)) {
875
			throw new DataGridException("Filter Select can only filter through one column.");
876
		}
877
878
		$this->addFilterCheck($key);
879
880
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
881
	}
882
883
884
	/**
@@ 914-925 (lines=12) @@
911
	 * @return Filter\FilterRange
912
	 * @throws DataGridException
913
	 */
914
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
915
	{
916
		$column = $column ?: $key;
917
918
		if (!is_string($column)) {
919
			throw new DataGridException("FilterRange can only filter through one column.");
920
		}
921
922
		$this->addFilterCheck($key);
923
924
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
925
	}
926
927
928
	/**
@@ 936-947 (lines=12) @@
933
	 * @return Filter\FilterDateRange
934
	 * @throws DataGridException
935
	 */
936
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
937
	{
938
		$column = $column ?: $key;
939
940
		if (!is_string($column)) {
941
			throw new DataGridException("FilterDateRange can only filter through one column.");
942
		}
943
944
		$this->addFilterCheck($key);
945
946
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
947
	}
948
949
950
	/**