DX: fix phpstan errors

This commit is contained in:
2023-02-04 00:50:58 +01:00
parent a01cc23c14
commit 856eea37ee
16 changed files with 94 additions and 120 deletions

View File

@@ -27,27 +27,27 @@ class PageGenerator implements Iterator
$this->paginator = $paginator;
}
public function current()
public function current(): Page
{
return $this->paginator->getPage($current);
return $this->paginator->getPage($this->current);
}
public function key()
public function key(): int
{
return $this->current;
}
public function next()
public function next(): void
{
++$this->current;
}
public function rewind()
public function rewind(): void
{
$this->current = 1;
}
public function valid()
public function valid(): bool
{
return 0 < $this->current
&& $this->paginator->countPages() >= $this->current;