delete++; break; case 'download': $this->download++; break; case 'flattr': $this->flattr++; break; case 'new': $this->new++; break; case 'play': $this->play++; break; } } /** * @return array */ public function toArray(): array { return [ 'delete' => $this->delete, 'download' => $this->download, 'flattr' => $this->flattr, 'new' => $this->new, 'play' => $this->play, ]; } /** * @return array */ public function jsonSerialize(): mixed { return $this->toArray(); } }