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