Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 779-790 (lines=12) @@
776
	 * @param string $column
777
	 * @throws DataGridException
778
	 */
779
	public function addFilterSelect($key, $name, $options, $column = NULL)
780
	{
781
		$column = $column ?: $key;
782
783
		if (!is_string($column)) {
784
			throw new DataGridException("Filter Select can only filter through one column.");
785
		}
786
787
		$this->addFilterCheck($key);
788
789
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
790
	}
791
792
793
	/**
@@ 821-832 (lines=12) @@
818
	 * @param string $column
819
	 * @throws DataGridException
820
	 */
821
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
822
	{
823
		$column = $column ?: $key;
824
825
		if (!is_string($column)) {
826
			throw new DataGridException("FilterRange can only filter through one column.");
827
		}
828
829
		$this->addFilterCheck($key);
830
831
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
832
	}
833
834
835
	/**
@@ 842-853 (lines=12) @@
839
	 * @param string $column
840
	 * @throws DataGridException
841
	 */
842
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
843
	{
844
		$column = $column ?: $key;
845
846
		if (!is_string($column)) {
847
			throw new DataGridException("FilterDateRange can only filter through one column.");
848
		}
849
850
		$this->addFilterCheck($key);
851
852
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
853
	}
854
855
856
	/**