Skip to content

Commit

Permalink
Updates usage of null coalesce operator and type casting
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Brückner <dev@froschdesignstudio.de>
  • Loading branch information
froschdesign committed Jun 22, 2020
1 parent f351418 commit 1beeba6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/book/application-integration/stand-alone.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $paginator = new Laminas\Paginator\Paginator(

// Configure paginator
$paginator->setItemCountPerPage(4);
$paginator->setCurrentPageNumber((int) $_GET['page'] ?? 1);
$paginator->setCurrentPageNumber((int) ($_GET['page'] ?? 1));
```

<details><summary>Example Data</summary>
Expand Down Expand Up @@ -278,7 +278,7 @@ $paginator = new Laminas\Paginator\Paginator(
new Laminas\Paginator\Adapter\ArrayAdapter($albums)
);
$paginator->setItemCountPerPage(4);
$paginator->setCurrentPageNumber((int) $_GET['page'] ?? 1);
$paginator->setCurrentPageNumber((int) ($_GET['page'] ?? 1));

// Create template resolver
$templateResolver = new Laminas\View\Resolver\TemplatePathStack([
Expand Down

0 comments on commit 1beeba6

Please sign in to comment.