return ($this->head === 0 && $this->tail === $this->size - 1) || $this->head === $this->tail + 1;
Or this? $return = $this->next?->resetPrevious();
Or this!!! $this->tail =
$this->tail?->setNext(new Node($this->tail, null, $value))->next
?? $this->head = new Node(null, null, $value);
Or leaves typos in their code? elseif ($this->tail === $this->size - 1) {
$this->tail = 0;just a tiny
}
I get that PHP has a bad rep but this ain't helping.