<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
* @param string $last_item_id The id†of the last item in the displayed item list
* @param integer $itemsPerPage An optional number of items per page to override the default value
*/
- public function __construct(L10n $l10n, $queryString, $first_item_id = null, $last_item_id = null, $itemsPerPage = 50)
+ public function __construct(L10n $l10n, string $queryString, string $first_item_id = null, string $last_item_id = null, int $itemsPerPage = 50)
{
parent::__construct($l10n, $queryString, $itemsPerPage);
}
}
- public function getStart()
+ public function getStart(): int
{
throw new \BadMethodCallException();
}
- public function getPage()
+ public function getPage(): int
{
throw new \BadMethodCallException();
}
* @return string HTML string of the pager
* @throws \Exception
*/
- public function renderMinimal(int $itemCount)
+ public function renderMinimal(int $itemCount): string
{
$displayedItemCount = max(0, intval($itemCount));
return Renderer::replaceMacros($tpl, ['pager' => $data]);
}
- public function renderFull($itemCount)
+ /**
+ * Unsupported method, must be type-compatible
+ */
+ public function renderFull(int $itemCount): string
{
throw new \BadMethodCallException();
}