Code Duplication    Length = 8-8 lines in 2 locations

DataStructures/Lists/CircularLinkedList.php 1 location

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

DataStructures/Lists/DoublyLinkedList.php 1 location

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