Code Duplication    Length = 8-8 lines in 2 locations

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.

DataStructures/Lists/CircularLinkedList.php 1 location

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