cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,21 +1,30 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Pagination;
use Iterator;
/**
* PageGenerator associated with a Paginator.
*/
class PageGenerator implements \Iterator
class PageGenerator implements Iterator
{
protected Paginator $paginator;
protected int $current = 1;
protected Paginator $paginator;
public function __construct(Paginator $paginator)
{
$this->paginator = $paginator;;
$this->paginator = $paginator;
}
public function current()
@@ -30,7 +39,7 @@ class PageGenerator implements \Iterator
public function next()
{
$this->current++;
++$this->current;
}
public function rewind()
@@ -40,7 +49,7 @@ class PageGenerator implements \Iterator
public function valid()
{
return $this->current > 0
&& $this->current <= $this->paginator->countPages();
return 0 < $this->current
&& $this->paginator->countPages() >= $this->current;
}
}