Code Duplication    Length = 8-8 lines in 2 locations

DataStructures/Lists/CircularLinkedList.php 1 location

@@ 304-311 (lines=8) @@
301
     *
302
     * @return mixed the data stored in the node.
303
     */
304
    private function deleteBeginning() {
305
        $temp = $this->head;
306
        $this->head = &$this->head->next;
307
        $this->tail->next = &$this->head;
308
        $this->size--;
309
310
        return $temp->data;
311
    }
312
313
    /**
314
     * Deletes at the specified position and returns the data stored.

DataStructures/Lists/DoublyLinkedList.php 1 location

@@ 320-327 (lines=8) @@
317
     *
318
     * @return mixed the data stored in the node.
319
     */
320
    private function deleteBeginning() {
321
        $temp = $this->head;
322
        $this->head = &$this->head->next;
323
        $this->tail->next = &$this->head;
324
        $this->size--;
325
326
        return $temp->data;
327
    }
328
329
    /**
330
     * Deletes at the specified position and returns the data stored.