next = $next; return $this; } public function getNext(): ?LinkedListItem { return $this->next; } public function setPrev(?LinkedListItem $prev) { $this->prev = $prev; return $this; } public function getPrev(): ?LinkedListItem { return $this->prev; } public function setValue($value) { $this->value = $value; return $this; } public function getValue() { return $this->value; } }