]> git.mxchange.org Git - friendica.git/commitdiff
Add expected type-hint to BoundariesPager::renderFull
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 22 Jun 2022 11:49:45 +0000 (07:49 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 22 Jun 2022 11:49:45 +0000 (07:49 -0400)
- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1162634199

src/Content/BoundariesPager.php
src/Content/Pager.php

index dbfa4ca73bdc5dec6da69e4443719960f70a0c43..fe95040519392d098f2c2b20421bc69106d6602b 100644 (file)
@@ -130,7 +130,7 @@ class BoundariesPager extends Pager
                return Renderer::replaceMacros($tpl, ['pager' => $data]);
        }
 
-       public function renderFull(int $itemCount)
+       public function renderFull(int $itemCount): string
        {
                throw new \BadMethodCallException();
        }
index 4e8a760a178bceeceaa08b6bf06085ef4ddf8fd8..5109fd1de3e3d806273daf6fcdb1304337cecde4 100644 (file)
@@ -199,13 +199,13 @@ class Pager
         *
         * $html = $pager->renderFull();
         *
-        * @param integer $itemCount The total number of items including those note displayed on the page
+        * @param int $itemCount The total number of items including those note displayed on the page
         * @return string HTML string of the pager
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        public function renderFull(int $itemCount): string
        {
-               $totalItemCount = max(0, intval($itemCount));
+               $totalItemCount = max(0, $itemCount);
 
                $data = [];