apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -11,7 +11,6 @@ declare(strict_types=1);
namespace Chill\MainBundle\Pagination;
use RuntimeException;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
/**
@@ -100,28 +99,21 @@ class Paginator implements PaginatorInterface
}
/**
* @throws RuntimeException if the next page does not exists
*
* @return \Chill\MainBundle\Pagination\Page
* @throws \RuntimeException if the next page does not exists
*/
public function getNextPage(): Page
{
if (!$this->hasNextPage()) {
throw new RuntimeException('this page has no next page');
throw new \RuntimeException('this page has no next page');
}
return $this->getPage($this->currentPageNumber + 1);
}
/**
*
* @return \Chill\MainBundle\Pagination\Page
*/
public function getPage(int $number): Page
{
if (!$this->hasPage($number)) {
throw new RuntimeException("The page with number {$number} does not "
. 'exists');
throw new \RuntimeException("The page with number {$number} does not ".'exists');
}
return new Page(
@@ -145,14 +137,14 @@ class Paginator implements PaginatorInterface
}
/**
* @throws RuntimeException if the next page does not exists
*
* @return \Chill\MainBundle\Pagination\Page
*
* @throws \RuntimeException if the next page does not exists
*/
public function getPreviousPage(): PageInterface
{
if (!$this->hasPreviousPage()) {
throw new RuntimeException('this page has no previous page');
throw new \RuntimeException('this page has no previous page');
}
return $this->getPage($this->currentPageNumber - 1);
@@ -163,9 +155,6 @@ class Paginator implements PaginatorInterface
return $this->totalItems;
}
/**
* @return bool
*/
public function hasNextPage(): bool
{
return $this->hasPage($this->currentPageNumber + 1);
@@ -181,9 +170,6 @@ class Paginator implements PaginatorInterface
&& $this->countPages() >= $number;
}
/**
* @return bool
*/
public function hasPreviousPage(): bool
{
return $this->hasPage($this->currentPageNumber - 1);