Merge pull request #11671 from MrPetovan/bug/fatal-errors
Add expected type-hint to BoundariesPager::renderFull
This commit is contained in:
commit
fa973d3b0f
|
@ -130,7 +130,7 @@ class BoundariesPager extends Pager
|
||||||
return Renderer::replaceMacros($tpl, ['pager' => $data]);
|
return Renderer::replaceMacros($tpl, ['pager' => $data]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderFull(int $itemCount)
|
public function renderFull(int $itemCount): string
|
||||||
{
|
{
|
||||||
throw new \BadMethodCallException();
|
throw new \BadMethodCallException();
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,13 +199,13 @@ class Pager
|
||||||
*
|
*
|
||||||
* $html = $pager->renderFull();
|
* $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
|
* @return string HTML string of the pager
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public function renderFull(int $itemCount): string
|
public function renderFull(int $itemCount): string
|
||||||
{
|
{
|
||||||
$totalItemCount = max(0, intval($itemCount));
|
$totalItemCount = max(0, $itemCount);
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
|
|
|
@ -1748,9 +1748,10 @@ class Database
|
||||||
* Fetch a database variable
|
* Fetch a database variable
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @return string content
|
* @return string|null content or null if inexistent
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function getVariable(string $name): string
|
public function getVariable(string $name)
|
||||||
{
|
{
|
||||||
$result = $this->fetchFirst("SHOW GLOBAL VARIABLES WHERE `Variable_name` = ?", $name);
|
$result = $this->fetchFirst("SHOW GLOBAL VARIABLES WHERE `Variable_name` = ?", $name);
|
||||||
return $result['Value'] ?? null;
|
return $result['Value'] ?? null;
|
||||||
|
|
Loading…
Reference in a new issue