From 50adb559823f935582f3ed308b8d4352c5f216ed Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 8 Jan 2025 13:26:09 +0100 Subject: Add some missing PHP native types (#7191) * Add some missing PHP native types Replaces https://github.com/FreshRSS/FreshRSS/pull/7184 * Clean some types --- lib/Minz/Paginator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Minz/Paginator.php') diff --git a/lib/Minz/Paginator.php b/lib/Minz/Paginator.php index 7d6892c67..265b0c2cb 100644 --- a/lib/Minz/Paginator.php +++ b/lib/Minz/Paginator.php @@ -64,11 +64,11 @@ class Minz_Paginator { * @param Minz_Model $item l'élément à retrouver * @return int|false la page à laquelle se trouve l’élément, false si non trouvé */ - public function pageByItem($item): int|false { + public function pageByItem(Minz_Model $item): int|false { $i = 0; do { - if ($item == $this->items[$i]) { + if ($item === $this->items[$i]) { return (int)(ceil(($i + 1) / $this->nbItemsPerPage)); } $i++; @@ -82,11 +82,11 @@ class Minz_Paginator { * @param Minz_Model $item the element to search * @return int|false the position of the element, or false if not found */ - public function positionByItem($item): int|false { + public function positionByItem(Minz_Model $item): int|false { $i = 0; do { - if ($item == $this->items[$i]) { + if ($item === $this->items[$i]) { return $i; } $i++; -- cgit v1.2.3