@@ -82,33 +82,33 @@ |
||
82 | 82 | case 0: |
83 | 83 | $page->setVariables([ |
84 | 84 | 'next' => [ |
85 | - 'id' => $pagesAsArray[$position+1]->getId(), |
|
86 | - 'path' => $pagesAsArray[$position+1]->getPath(), |
|
87 | - 'title' => $pagesAsArray[$position+1]->getVariable('title'), |
|
85 | + 'id' => $pagesAsArray[$position + 1]->getId(), |
|
86 | + 'path' => $pagesAsArray[$position + 1]->getPath(), |
|
87 | + 'title' => $pagesAsArray[$position + 1]->getVariable('title'), |
|
88 | 88 | ], |
89 | 89 | ]); |
90 | 90 | break; |
91 | 91 | // last |
92 | - case (count($pagesAsArray)-1): |
|
92 | + case (count($pagesAsArray) - 1): |
|
93 | 93 | $page->setVariables([ |
94 | 94 | 'prev' => [ |
95 | - 'id' => $pagesAsArray[$position-1]->getId(), |
|
96 | - 'path' => $pagesAsArray[$position-1]->getPath(), |
|
97 | - 'title' => $pagesAsArray[$position-1]->getVariable('title'), |
|
95 | + 'id' => $pagesAsArray[$position - 1]->getId(), |
|
96 | + 'path' => $pagesAsArray[$position - 1]->getPath(), |
|
97 | + 'title' => $pagesAsArray[$position - 1]->getVariable('title'), |
|
98 | 98 | ], |
99 | 99 | ]); |
100 | 100 | break; |
101 | 101 | default: |
102 | 102 | $page->setVariables([ |
103 | 103 | 'prev' => [ |
104 | - 'id' => $pagesAsArray[$position-1]->getId(), |
|
105 | - 'path' => $pagesAsArray[$position-1]->getPath(), |
|
106 | - 'title' => $pagesAsArray[$position-1]->getVariable('title'), |
|
104 | + 'id' => $pagesAsArray[$position - 1]->getId(), |
|
105 | + 'path' => $pagesAsArray[$position - 1]->getPath(), |
|
106 | + 'title' => $pagesAsArray[$position - 1]->getVariable('title'), |
|
107 | 107 | ], |
108 | 108 | 'next' => [ |
109 | - 'id' => $pagesAsArray[$position+1]->getId(), |
|
110 | - 'path' => $pagesAsArray[$position+1]->getPath(), |
|
111 | - 'title' => $pagesAsArray[$position+1]->getVariable('title'), |
|
109 | + 'id' => $pagesAsArray[$position + 1]->getId(), |
|
110 | + 'path' => $pagesAsArray[$position + 1]->getPath(), |
|
111 | + 'title' => $pagesAsArray[$position + 1]->getVariable('title'), |
|
112 | 112 | ], |
113 | 113 | ]); |
114 | 114 | break; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | $configPaginationPath = $this->config->get('site.pagination.path'); |
32 | 32 | |
33 | 33 | // filter pages: home and sections |
34 | - $filteredPages = $this->pagesCollection->filter(function (Page $page) { |
|
34 | + $filteredPages = $this->pagesCollection->filter(function(Page $page) { |
|
35 | 35 | return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION]); |
36 | 36 | }); |
37 | 37 | /* @var $page Page */ |