aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Paginator.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-08-01 20:31:40 +0200
committerGravatar GitHub <noreply@github.com> 2024-08-01 20:31:40 +0200
commitd2247221bbf23a8fe19f66ea4ad7d0a59ffaa5b4 (patch)
treef5174c1b1d174cd41dca20f350e1297894e1c6fa /lib/Minz/Paginator.php
parentb2c8cb74562b2f7cb290abd61ff1b6f35475f23a (diff)
Minor update whitespace PHPCS rules (#6666)
* Minor update whitespace PHPCS rules To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12. Does not change our current conventions, but just a bit more consistent. * Forgotten *.phtml * Sort exclusion patterns + add a few for Extensions repo * Relaxed some rules
Diffstat (limited to 'lib/Minz/Paginator.php')
-rw-r--r--lib/Minz/Paginator.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Minz/Paginator.php b/lib/Minz/Paginator.php
index df145f4bf..3b3c0961e 100644
--- a/lib/Minz/Paginator.php
+++ b/lib/Minz/Paginator.php
@@ -90,7 +90,7 @@ class Minz_Paginator {
return $i;
}
$i++;
- } while ($i < $this->nbItems ());
+ } while ($i < $this->nbItems());
return false;
}
@@ -102,7 +102,7 @@ class Minz_Paginator {
*/
public function itemByPosition(int $pos): Minz_Model {
if ($pos < 0) {
- $pos = $this->nbItems () - 1;
+ $pos = $this->nbItems() - 1;
}
if ($pos >= count($this->items)) {
$pos = 0;
@@ -120,7 +120,7 @@ class Minz_Paginator {
*/
public function items(bool $all = false): array {
$array = array ();
- $nbItems = $this->nbItems ();
+ $nbItems = $this->nbItems();
if ($nbItems <= $this->nbItemsPerPage || $all) {
$array = $this->items;
@@ -165,8 +165,8 @@ class Minz_Paginator {
$this->_nbPage();
}
public function _nbItemsPerPage(int $nbItemsPerPage): void {
- if ($nbItemsPerPage > $this->nbItems ()) {
- $nbItemsPerPage = $this->nbItems ();
+ if ($nbItemsPerPage > $this->nbItems()) {
+ $nbItemsPerPage = $this->nbItems();
}
if ($nbItemsPerPage < 0) {
$nbItemsPerPage = 0;