this can be simplified as ``$this->hasNextPage() ? ... : ... ``. ``$this->hasNextPage()`` is already a boolean