Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 756-767 (lines=12) @@
753
	 * @param string $column
754
	 * @throws DataGridException
755
	 */
756
	public function addFilterSelect($key, $name, $options, $column = NULL)
757
	{
758
		$column = $column ?: $key;
759
760
		if (!is_string($column)) {
761
			throw new DataGridException("Filter Select can only filter through one column.");
762
		}
763
764
		$this->addFilterCheck($key);
765
766
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
767
	}
768
769
770
	/**
@@ 798-809 (lines=12) @@
795
	 * @param string $column
796
	 * @throws DataGridException
797
	 */
798
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
799
	{
800
		$column = $column ?: $key;
801
802
		if (!is_string($column)) {
803
			throw new DataGridException("FilterRange can only filter through one column.");
804
		}
805
806
		$this->addFilterCheck($key);
807
808
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
809
	}
810
811
812
	/**
@@ 819-830 (lines=12) @@
816
	 * @param string $column
817
	 * @throws DataGridException
818
	 */
819
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
820
	{
821
		$column = $column ?: $key;
822
823
		if (!is_string($column)) {
824
			throw new DataGridException("FilterDateRange can only filter through one column.");
825
		}
826
827
		$this->addFilterCheck($key);
828
829
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
830
	}
831
832
833
	/**