Code Duplication    Length = 8-8 lines in 2 locations

DataStructures/Lists/CircularLinkedList.php 1 location

@@ 290-297 (lines=8) @@
287
     *
288
     * @return mixed the data stored in the node.
289
     */
290
    private function deleteBeginning() {
291
        $temp = $this->head;
292
        $this->head = &$this->head->next;
293
        $this->tail->next = &$this->head;
294
        $this->size--;
295
296
        return $temp->data;
297
    }
298
299
    /**
300
     * Deletes at the specified position and returns the data stored.

DataStructures/Lists/DoublyLinkedList.php 1 location

@@ 314-321 (lines=8) @@
311
     *
312
     * @return mixed the data stored in the node.
313
     */
314
    private function deleteBeginning() {
315
        $temp = $this->head;
316
        $this->head = &$this->head->next;
317
        $this->tail->next = &$this->head;
318
        $this->size--;
319
320
        return $temp->data;
321
    }
322
323
    /**
324
     * Deletes at the specified position and returns the data stored.