Completed
Push — collection-position ( 636ee4...426961 )
by Arnaud
02:12
created
src/Generator/TitleReplace.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function generate(): void
23 23
     {
24
-        $filteredPages = $this->pagesCollection->filter(function (Page $page) {
24
+        $filteredPages = $this->pagesCollection->filter(function(Page $page) {
25 25
             return null !== $page->getVariable('title');
26 26
         });
27 27
 
Please login to merge, or discard this patch.
src/Generator/Redirect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function generate(): void
23 23
     {
24
-        $filteredPages = $this->pagesCollection->filter(function (Page $page) {
24
+        $filteredPages = $this->pagesCollection->filter(function(Page $page) {
25 25
             return null !== $page->getVariable('redirect')
26 26
                 && $page->getVariable('layout') != 'redirect';
27 27
         });
Please login to merge, or discard this patch.
src/Generator/ExternalBody.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function generate(): void
24 24
     {
25
-        $filteredPages = $this->pagesCollection->filter(function (Page $page) {
25
+        $filteredPages = $this->pagesCollection->filter(function(Page $page) {
26 26
             return null !== $page->getVariable('external');
27 27
         });
28 28
 
Please login to merge, or discard this patch.
src/Generator/Homepage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function generate(): void
23 23
     {
24
-        $subPages = $this->pagesCollection->filter(function (Page $page) {
24
+        $subPages = $this->pagesCollection->filter(function(Page $page) {
25 25
             return $page->getType() == TYPE::PAGE
26 26
                 && $page->getId() != 'index'; // exclude homepage
27 27
         });
Please login to merge, or discard this patch.
src/Collection/Collection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     protected function searchItem(string $id): ?array
68 68
     {
69
-        return array_filter($this->items, function ($item) use ($id) {
69
+        return array_filter($this->items, function($item) use ($id) {
70 70
             return $item->getId() == $id;
71 71
         });
72 72
     }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     public function usort(\Closure $callback = null): CollectionInterface
234 234
     {
235
-        $callback ? usort($this->items, $callback) : usort($this->items, function ($a, $b) {
235
+        $callback ? usort($this->items, $callback) : usort($this->items, function($a, $b) {
236 236
             if ($a == $b) {
237 237
                 return 0;
238 238
             }
Please login to merge, or discard this patch.
src/Renderer/Layout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,8 +113,8 @@
 block discarded – undo
113 113
             case PageType::TERM:
114 114
                $layouts = [
115 115
                     // "taxonomy/$term.$format.twig", // ie: taxonomy/velo.html.twig
116
-                    "_default/term.$format.twig",     // ie: _default/term.html.twig
117
-                    "_default/list.$format.twig",     // ie: _default/list.html.twig
116
+                    "_default/term.$format.twig", // ie: _default/term.html.twig
117
+                    "_default/list.$format.twig", // ie: _default/list.html.twig
118 118
                 ];
119 119
                 if ($page->getVariable('term')) {
120 120
                     $layouts = array_merge(
Please login to merge, or discard this patch.
src/Generator/Section.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -82,33 +82,33 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Generator/Pagination.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
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 */
Please login to merge, or discard this patch.