That code is so bad. Who does this?! 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. |
Well, I’m doing this for fun, mostly in an illustrative manner. I’m not getting paid for this, nor is anyone reviewing my work. So thanks for volunteering, though your critical analysis could be more constructive.
As to the typos, I suspect it comes from the WordPress editor just being its weird self and perhaps me starting to type in the wrong place, or Grammarly updating the wrong thing. Who knows, but it’s not in the markdown version of this draft.