Passed
Push — logger ( 576894 )
by Arnaud
11:17
created
config/default.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@
 block discarded – undo
13 13
     'title'        => 'My Website',
14 14
     'baseline'     => 'My amazing static website!',
15 15
     'baseurl'      => 'http://localhost:8000/',
16
-    'canonicalurl' => false,   // if true 'url()' function preprends URL wirh 'baseurl'
16
+    'canonicalurl' => false, // if true 'url()' function preprends URL wirh 'baseurl'
17 17
     'description'  => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
18
-    'taxonomies'   => [        // default taxonomies
18
+    'taxonomies'   => [// default taxonomies
19 19
         'tags'       => 'tag', // can be disabled with 'disabled' value
20 20
         'categories' => 'category',
21 21
     ],
22 22
     'pagination' => [
23
-        'max'  => 5,      // number of pages on each paginated pages
23
+        'max'  => 5, // number of pages on each paginated pages
24 24
         'path' => 'page', // path to paginated pages. ie: '/blog/page/2/'
25 25
     ],
26 26
     'date'   => [
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
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         }
30 30
 
31 31
         // filters pages: home, sections and terms
32
-        $filteredPages = $this->pagesCollection->filter(function (Page $page) {
32
+        $filteredPages = $this->pagesCollection->filter(function(Page $page) {
33 33
             return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION, Type::TERM]);
34 34
         });
35 35
         /** @var Page $page */
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
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function generate(): void
25 25
     {
26
-        $subPages = $this->pagesCollection->filter(function (Page $page) {
26
+        $subPages = $this->pagesCollection->filter(function(Page $page) {
27 27
             return $page->getType() == TYPE::PAGE
28 28
                 && $page->getId() != 'index'; // excludes homepage
29 29
         });
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
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function filterBy(PagesCollection $pages, string $variable, string $value): CollectionInterface
126 126
     {
127
-        $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) {
127
+        $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) {
128 128
             $notVirtual = false;
129 129
             if (!$page->isVirtual()) {
130 130
                 $notVirtual = true;
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function sortByWeight(\Traversable $collection): array
168 168
     {
169
-        $callback = function ($a, $b) {
169
+        $callback = function($a, $b) {
170 170
             if (!isset($a['weight'])) {
171 171
                 return 1;
172 172
             }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      */
196 196
     public function sortByDate(\Traversable $collection): array
197 197
     {
198
-        $callback = function ($a, $b) {
198
+        $callback = function($a, $b) {
199 199
             if (!isset($a['date'])) {
200 200
                 return -1;
201 201
             }
Please login to merge, or discard this patch.
src/Step/PagesRender.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         // collects published pages
60 60
         /** @var Page $page */
61
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
61
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
62 62
             return !empty($page->getVariable('published'));
63 63
         });
64 64
         $max = count($filteredPages);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         }
286 286
         $rendered = preg_replace_callback(
287 287
             '/href="([A-Za-z0-9_\.\-\/]+)\.md(\#[A-Za-z0-9\-]+)?"/is',
288
-            function ($matches) use ($replace) {
288
+            function($matches) use ($replace) {
289 289
                 return \sprintf($replace, Page::slugify(PrefixSuffix::sub($matches[1])), $matches[2] ?? '');
290 290
             },
291 291
             $rendered
Please login to merge, or discard this patch.
src/Step/PagesSave.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         call_user_func_array($this->builder->getMessageCb(), ['SAVE', 'Saving pages']);
48 48
 
49 49
         /** @var Page $page */
50
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
50
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
51 51
             return !empty($page->getVariable('rendered'));
52 52
         });
53 53
         $max = count($filteredPages);
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
          * Overrides configuration with environment variables.
57 57
          */
58 58
         $data = $this->getData();
59
-        $applyEnv = function ($array) use ($data) {
59
+        $applyEnv = function($array) use ($data) {
60 60
             $iterator = new \RecursiveIteratorIterator(
61 61
                 new \RecursiveArrayIterator($array),
62 62
                 \RecursiveIteratorIterator::SELF_FIRST
Please login to merge, or discard this patch.
src/Command/ShowContent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         $dataDir = (string) $this->getBuilder()->getConfig()->get('data.dir');
52 52
 
53 53
         // formating output
54
-        $unicodeTreePrefix = function (RecursiveTreeIterator $tree) {
54
+        $unicodeTreePrefix = function(RecursiveTreeIterator $tree) {
55 55
             $prefixParts = [
56 56
                 RecursiveTreeIterator::PREFIX_LEFT         => ' ',
57 57
                 RecursiveTreeIterator::PREFIX_MID_HAS_NEXT => '│ ',
Please login to merge, or discard this patch.
src/Command/Command.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@
 block discarded – undo
193 193
      */
194 194
     public function messageCallback(): \Closure
195 195
     {
196
-        return function ($code, $message = '', $itemsCount = 0, $itemsMax = 0) {
196
+        return function($code, $message = '', $itemsCount = 0, $itemsMax = 0) {
197 197
             $output = $this->output;
198 198
             if (strpos($code, '_PROGRESS') !== false) {
199 199
                 if ($output->isVerbose()) {
Please login to merge, or discard this patch.