Code Duplication    Length = 8-8 lines in 2 locations

DataStructures/Lists/CircularLinkedList.php 1 location

@@ 353-360 (lines=8) @@
350
     *
351
     * @return mixed the data stored in the node.
352
     */
353
    private function deleteBeginning() {
354
        $temp = $this->head;
355
        $this->head = &$this->head->next;
356
        $this->tail->next = &$this->head;
357
        $this->size--;
358
359
        return $temp->data;
360
    }
361
362
    /**
363
     * Deletes at the specified position and returns the data stored.

DataStructures/Lists/DoublyLinkedList.php 1 location

@@ 371-378 (lines=8) @@
368
     *
369
     * @return mixed the data stored in the node.
370
     */
371
    private function deleteBeginning() {
372
        $temp = $this->head;
373
        $this->head = &$this->head->next;
374
        $this->tail->next = &$this->head;
375
        $this->size--;
376
377
        return $temp->data;
378
    }
379
380
    /**
381
     * Deletes at the specified position and returns the data stored.