Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 821-832 (lines=12) @@
818
	 * @param string $column
819
	 * @throws DataGridException
820
	 */
821
	public function addFilterSelect($key, $name, $options, $column = NULL)
822
	{
823
		$column = $column ?: $key;
824
825
		if (!is_string($column)) {
826
			throw new DataGridException("Filter Select can only filter through one column.");
827
		}
828
829
		$this->addFilterCheck($key);
830
831
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
832
	}
833
834
835
	/**
@@ 863-874 (lines=12) @@
860
	 * @param string $column
861
	 * @throws DataGridException
862
	 */
863
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
864
	{
865
		$column = $column ?: $key;
866
867
		if (!is_string($column)) {
868
			throw new DataGridException("FilterRange can only filter through one column.");
869
		}
870
871
		$this->addFilterCheck($key);
872
873
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
874
	}
875
876
877
	/**
@@ 884-895 (lines=12) @@
881
	 * @param string $column
882
	 * @throws DataGridException
883
	 */
884
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
885
	{
886
		$column = $column ?: $key;
887
888
		if (!is_string($column)) {
889
			throw new DataGridException("FilterDateRange can only filter through one column.");
890
		}
891
892
		$this->addFilterCheck($key);
893
894
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
895
	}
896
897
898
	/**