Code Duplication    Length = 19-20 lines in 2 locations

src/DataGrid.php 2 locations

@@ 1864-1882 (lines=19) @@
1861
	 * @param  string $column
1862
	 * @return void
1863
	 */
1864
	public function handleShowColumn($column)
1865
	{
1866
		$columns = $this->getSessionData('_grid_hidden_columns');
1867
1868
		if (!empty($columns)) {
1869
			$pos = array_search($column, $columns);
1870
1871
			if ($pos !== FALSE) {
1872
				unset($columns[$pos]);
1873
			}
1874
		}
1875
1876
		$this->saveSessionData('_grid_hidden_columns', $columns);
1877
		$this->saveSessionData('_grid_hidden_columns_manipulated', TRUE);
1878
1879
		$this->redrawControl();
1880
1881
		$this->onRedraw();
1882
	}
1883
1884
1885
	/**
@@ 1890-1909 (lines=20) @@
1887
	 * @param  string $column
1888
	 * @return void
1889
	 */
1890
	public function handleHideColumn($column)
1891
	{
1892
		/**
1893
		 * Store info about hiding a column to session
1894
		 */
1895
		$columns = $this->getSessionData('_grid_hidden_columns');
1896
1897
		if (empty($columns)) {
1898
			$columns = [$column];
1899
		} else if (!in_array($column, $columns)) {
1900
			array_push($columns, $column);
1901
		}
1902
1903
		$this->saveSessionData('_grid_hidden_columns', $columns);
1904
		$this->saveSessionData('_grid_hidden_columns_manipulated', TRUE);
1905
1906
		$this->redrawControl();
1907
1908
		$this->onRedraw();
1909
	}
1910
1911
1912
	public function handleActionCallback($__key, $__id)