Code Duplication    Length = 8-8 lines in 2 locations

DataStructures/Lists/CircularLinkedList.php 1 location

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

DataStructures/Lists/DoublyLinkedList.php 1 location

@@ 395-402 (lines=8) @@
392
     *
393
     * @return mixed the data stored in the node.
394
     */
395
    private function deleteBeginning() {
396
        $temp = $this->head;
397
        $this->head = &$this->head->next;
398
        $this->tail->next = &$this->head;
399
        $this->size--;
400
401
        return $temp->data;
402
    }
403
404
    /**
405
     * Deletes at the specified position and returns the data stored.