Code Duplication    Length = 12-12 lines in 3 locations

src/DataGrid.php 3 locations

@@ 986-997 (lines=12) @@
983
	 * @return Filter\FilterSelect
984
	 * @throws DataGridException
985
	 */
986
	public function addFilterSelect($key, $name, array $options, $column = NULL)
987
	{
988
		$column = $column ?: $key;
989
990
		if (!is_string($column)) {
991
			throw new DataGridException("Filter Select can only filter in one column.");
992
		}
993
994
		$this->addFilterCheck($key);
995
996
		return $this->filters[$key] = new Filter\FilterSelect($key, $name, $options, $column);
997
	}
998
999
1000
	/**
@@ 1053-1064 (lines=12) @@
1050
	 * @return Filter\FilterRange
1051
	 * @throws DataGridException
1052
	 */
1053
	public function addFilterRange($key, $name, $column = NULL, $name_second = '-')
1054
	{
1055
		$column = $column ?: $key;
1056
1057
		if (!is_string($column)) {
1058
			throw new DataGridException("FilterRange can only filter in one column.");
1059
		}
1060
1061
		$this->addFilterCheck($key);
1062
1063
		return $this->filters[$key] = new Filter\FilterRange($key, $name, $column, $name_second);
1064
	}
1065
1066
1067
	/**
@@ 1075-1086 (lines=12) @@
1072
	 * @return Filter\FilterDateRange
1073
	 * @throws DataGridException
1074
	 */
1075
	public function addFilterDateRange($key, $name, $column = NULL, $name_second = '-')
1076
	{
1077
		$column = $column ?: $key;
1078
1079
		if (!is_string($column)) {
1080
			throw new DataGridException("FilterDateRange can only filter in one column.");
1081
		}
1082
1083
		$this->addFilterCheck($key);
1084
1085
		return $this->filters[$key] = new Filter\FilterDateRange($key, $name, $column, $name_second);
1086
	}
1087
1088
1089
	/**