Code Duplication    Length = 8-8 lines in 2 locations

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.

DataStructures/Lists/DoublyLinkedList.php 1 location

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