/** * @return int */ public function getAllMaxPage() { $count = $this->repository->getAllCount(); $maxPage = ceil($count / self::ALL_POST_LIMIT); return $maxPage; }