/** * Adds a node to the closed list and removed it from the opened list * @param Node $node Node to add to the closed list * @return null */ protected function addNodeToClosed(Node $node) { $id = $node->getId(); $this->closed[$id] = $node; unset($this->opened[$id]); }