/** * Finish current context. * * @return $this */ public function goUp() { if ($this->currentContext && $this->currentContext !== null) { $parent = $this->currentContext->getParent(); if ($parent) { $this->currentContext = $parent; $this->level--; } } return $this; }