private function attach($head, $node) {
        $node->setPrevious($head);
        $node->setNext($head->getNext());
        $node->getNext()->setPrevious($node);
        $node->getPrevious()->setNext($node);
    }
private function attach($head, $node) {
        $node->setPrevious($head);
        $node->setNext($head->getNext());
        $node->getNext()->setPrevious($node);
        $node->getPrevious()->setNext($node);
    }
private function attach ( $ head , $ node ) { $ node -> setPrevious ( $ head ) ; $ node -> setNext ( $ head -> getNext ( ) ) ; $ node -> getNext ( ) -> setPrevious ( $ node ) ; $ node -> getPrevious ( ) -> setNext ( $ node ) ; }
Adds a node to the head of the list
@param Node $head the node object that represents the head of the list
@param Node $node the node to move to the head of the list
Adds a node to the head of the list