diff options
| author | 2025-01-08 13:26:09 +0100 | |
|---|---|---|
| committer | 2025-01-08 13:26:09 +0100 | |
| commit | 50adb559823f935582f3ed308b8d4352c5f216ed (patch) | |
| tree | 74f09efadfcaf28f82505e791e267596f4026053 /lib/Minz/Paginator.php | |
| parent | fa701b39f3775ac4250a82fabcec8970b446789b (diff) | |
Add some missing PHP native types (#7191)
* Add some missing PHP native types
Replaces https://github.com/FreshRSS/FreshRSS/pull/7184
* Clean some types
Diffstat (limited to 'lib/Minz/Paginator.php')
| -rw-r--r-- | lib/Minz/Paginator.php | 8 |
1 files changed, 4 insertions, 4 deletions
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++; |
