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