Code Duplication    Length = 14-17 lines in 2 locations

src/DataGrid.php 2 locations

@@ 1709-1725 (lines=17) @@
1706
	 * @param  int $parent
1707
	 * @return void
1708
	 */
1709
	public function handleGetChildren($parent)
1710
	{
1711
		$this->setDataSource(
1712
			call_user_func($this->tree_view_children_callback, $parent)
1713
		);
1714
1715
		if ($this->getPresenter()->isAjax()) {
1716
			$this->getPresenter()->payload->_datagrid_url = $this->refresh_url;
1717
			$this->getPresenter()->payload->_datagrid_tree = $parent;
1718
1719
			$this->redrawControl('items');
1720
1721
			$this->onRedraw();
1722
		} else {
1723
			$this->getPresenter()->redirect('this');
1724
		}
1725
	}
1726
1727
1728
	/**
@@ 1733-1746 (lines=14) @@
1730
	 * @param  mixed $id
1731
	 * @return void
1732
	 */
1733
	public function handleGetItemDetail($id)
1734
	{
1735
		$this->template->add('toggle_detail', $id);
1736
		$this->redraw_item = [$this->items_detail->getPrimaryWhereColumn() => $id];
1737
1738
		if ($this->getPresenter()->isAjax()) {
1739
			$this->getPresenter()->payload->_datagrid_toggle_detail = $id;
1740
			$this->redrawControl('items');
1741
1742
			$this->onRedraw();
1743
		} else {
1744
			$this->getPresenter()->redirect('this');
1745
		}
1746
	}
1747
1748
1749
	/**