Code Duplication    Length = 8-8 lines in 2 locations

DataStructures/Lists/CircularLinkedList.php 1 location

@@ 332-339 (lines=8) @@
329
     *
330
     * @return mixed the data stored in the node.
331
     */
332
    private function deleteBeginning() {
333
        $temp = $this->head;
334
        $this->head = &$this->head->next;
335
        $this->tail->next = &$this->head;
336
        $this->size--;
337
338
        return $temp->data;
339
    }
340
341
    /**
342
     * Deletes at the specified position and returns the data stored.

DataStructures/Lists/DoublyLinkedList.php 1 location

@@ 333-340 (lines=8) @@
330
     *
331
     * @return mixed the data stored in the node.
332
     */
333
    private function deleteBeginning() {
334
        $temp = $this->head;
335
        $this->head = &$this->head->next;
336
        $this->tail->next = &$this->head;
337
        $this->size--;
338
339
        return $temp->data;
340
    }
341
342
    /**
343
     * Deletes at the specified position and returns the data stored.