Completed
Push — feature-output-formats ( 37287d...fcef54 )
by Arnaud
02:23
created
src/Step/ConfigImport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
             $themeConfigFile = $this->config->getThemesPath().'/'.$theme.'/'.self::THEME_CONFIG_FILE;
45 45
             if (Util::getFS()->exists($themeConfigFile)) {
46 46
                 set_error_handler(
47
-                    function ($severity, $message, $file, $line) {
47
+                    function($severity, $message, $file, $line) {
48 48
                         throw new \ErrorException($message, $severity, $severity, $file, $line);
49 49
                     }
50 50
                 );
Please login to merge, or discard this patch.
src/Renderer/Twig/Extension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function filterBy(PagesCollection $pages, string $variable, string $value): CollectionInterface
118 118
     {
119
-        $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) {
119
+        $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) {
120 120
             // dedicated getter?
121 121
             $method = 'get'.ucfirst($variable);
122 122
             if (method_exists($page, $method) && $page->$method() == $value) {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function sortByWeight($array)
160 160
     {
161
-        $callback = function ($a, $b) {
161
+        $callback = function($a, $b) {
162 162
             if (!isset($a['weight'])) {
163 163
                 return 1;
164 164
             }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function sortByDate($array)
193 193
     {
194
-        $callback = function ($a, $b) {
194
+        $callback = function($a, $b) {
195 195
             if (!isset($a['date'])) {
196 196
                 return -1;
197 197
             }
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
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     {
25 25
         $generatedPages = new PagesCollection();
26 26
 
27
-        $filteredPages = $pagesCollection->filter(function (Page $page) {
27
+        $filteredPages = $pagesCollection->filter(function(Page $page) {
28 28
             return null !== $page->getVariable('external');
29 29
         });
30 30
 
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
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     {
24 24
         $generatedPages = new PagesCollection();
25 25
 
26
-        $filteredPages = $pagesCollection->filter(function (Page $page) {
26
+        $filteredPages = $pagesCollection->filter(function(Page $page) {
27 27
             return null !== $page->getVariable('redirect');
28 28
         });
29 29
 
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
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $generatedPages = new PagesCollection();
26 26
 
27 27
         if (!$pagesCollection->has('index')) {
28
-            $filteredPages = $pagesCollection->filter(function (Page $page) {
28
+            $filteredPages = $pagesCollection->filter(function(Page $page) {
29 29
                 return ($page->getType() === null || $page->getType() === TYPE::PAGE)
30 30
                 && $page->getSection() == $this->config->get('site.paginate.homepage.section')
31 31
                 && !empty($page->getBody());
Please login to merge, or discard this patch.
src/Step/PagesGenerate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             call_user_func_array($this->builder->getMessageCb(), ['GENERATE', 'Generating pages']);
37 37
 
38 38
             $generators = $this->builder->getConfig()->get('generators');
39
-            array_walk($generators, function ($generator, $priority) use ($generatorManager) {
39
+            array_walk($generators, function($generator, $priority) use ($generatorManager) {
40 40
                 if (!class_exists($generator)) {
41 41
                     $message = sprintf("Unable to load generator '%s'", $generator);
42 42
                     call_user_func_array($this->builder->getMessageCb(), ['GENERATE_ERROR', $message]);
Please login to merge, or discard this patch.
src/Generator/TitleReplace.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     {
24 24
         $generatedPages = new PagesCollection();
25 25
 
26
-        $filteredPages = $pagesCollection->filter(function (Page $page) {
26
+        $filteredPages = $pagesCollection->filter(function(Page $page) {
27 27
             return null !== $page->getVariable('title');
28 28
         });
29 29
 
Please login to merge, or discard this patch.
src/Generator/Pagination.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $generatedPages = new PagesCollection();
26 26
 
27
-        $filteredPages = $pagesCollection->filter(function (Page $page) {
27
+        $filteredPages = $pagesCollection->filter(function(Page $page) {
28 28
             return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION]);
29 29
         });
30 30
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 $paginatePagesCount = ceil($pagesTotal / $paginatePerPage);
48 48
                 for ($i = 0; $i < $paginatePagesCount; $i++) {
49 49
                     $pagesInPagination = new \LimitIterator($pages->getIterator(), ($i * $paginatePerPage), $paginatePerPage);
50
-                    $pagesInPagination = new PagesCollection($page->getId().'-page-'.($i+1), iterator_to_array($pagesInPagination));
50
+                    $pagesInPagination = new PagesCollection($page->getId().'-page-'.($i + 1), iterator_to_array($pagesInPagination));
51 51
                     $alteredPage = clone $page;
52 52
                     // first page
53 53
                     $firstPath = Page::slugify(sprintf('%s', $path));
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
                     $alteredPage->setVariable('totalpages', $pagesTotal);
78 78
                     $alteredPage->setVariable('pages', $pagesInPagination);
79 79
                     // create links
80
-                    $pagination = ['self' => $currentPath?: 'index'];
81
-                    $pagination += ['first' => $firstPath?: 'index'];
80
+                    $pagination = ['self' => $currentPath ?: 'index'];
81
+                    $pagination += ['first' => $firstPath ?: 'index'];
82 82
                     if ($i == 1) {
83
-                        $pagination += ['prev' => Page::slugify($path?: 'index')];
83
+                        $pagination += ['prev' => Page::slugify($path ?: 'index')];
84 84
                     }
85 85
                     if ($i > 1) {
86 86
                         $pagination += ['prev' => Page::slugify(sprintf('%s/%s/%s', $path, $paginatePath, $i))];
Please login to merge, or discard this patch.