src/Datastructure/Cache/LRUCache.php
public function get($key) {
        if ($this->hashMap->containsKey($key)) {
            $node = $this->getNodeFromHead($key);
            $this->unset($node);
            $this->updateHead($node);
            return $this->head->getValue();
        }
        return null;
    }
public function get($key) {
        if ($this->hashMap->containsKey($key)) {
            $node = $this->getNodeFromHead($key);
            $this->unset($node);
            $this->updateHead($node);
            return $this->head->getValue();
        }
        return null;
    }
public function get ( $ key ) { if ( $ this -> hashMap -> containsKey ( $ key ) ) { $ node = $ this -> getNodeFromHead ( $ key ) ; $ this -> unset ( $ node ) ; $ this -> updateHead ( $ node ) ; return $ this -> head -> getValue ( ) ; } return null ; }
retrieves a value

@param $key
@return mixed
retrieves a value