/** * @param $key * * @return mixed */ function get($key) { assert($this->offsetExists($key)); /** * @var Pair $pair */ $pair = $this->avl->get(new Pair($key, null)); return $pair->second; }
/** * @param $key * * @return mixed * @throws TypeException when the $key is not the correct type. * @throws KeyException when the $key is not the correct type. */ function get($key) { if (!$this->offsetExists($key)) { throw new KeyException(); } /** * @var Pair $pair */ $pair = $this->avl->get(new Pair($key, null)); return $pair->second; }