Passed
Push — figcaption ( 0b8c0c...10fd5a )
by Arnaud
08:26 queued 05:24
created
src/Builder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
         $this->options = array_merge([
133 133
             'drafts'  => false, // build drafts or not
134 134
             'dry-run' => false, // if dry-run is true, generated files are not saved
135
-            'page'    => '',    // specific page to build
135
+            'page'    => '', // specific page to build
136 136
         ], $options);
137 137
 
138 138
         // process each step
Please login to merge, or discard this patch.
src/Command/Serve.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
         $buildProcess->setPty(Process::isPtySupported());
133 133
         $buildProcess->setTimeout(3600 * 2); // timeout = 2 minutes
134 134
 
135
-        $processOutputCallback = function ($type, $data) use ($output) {
135
+        $processOutputCallback = function($type, $data) use ($output) {
136 136
             $output->write($data, false, OutputInterface::OUTPUT_RAW);
137 137
         };
138 138
 
Please login to merge, or discard this patch.
src/Step/Data/Load.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         foreach ($files as $file) {
68 68
             $count++;
69 69
             set_error_handler(
70
-                function ($severity, $message, $file, $line) {
70
+                function($severity, $message, $file, $line) {
71 71
                     throw new \ErrorException($message, 0, $severity, $file, $line, null);
72 72
                 }
73 73
             );
Please login to merge, or discard this patch.
src/Step/Pages/Save.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     public function process(): void
58 58
     {
59 59
         /** @var Page $page */
60
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
60
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
61 61
             return !empty($page->getRendered());
62 62
         });
63 63
         $max = count($filteredPages);
Please login to merge, or discard this patch.
src/Step/Menus/Create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
      */
147 147
     protected function collectPages(): void
148 148
     {
149
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
149
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
150 150
             return $page->hasVariable('menu')
151 151
                 && $page->getVariable('published')
152 152
                 && in_array($page->getVariable('language', $this->config->getLanguageDefault()), array_column($this->config->getLanguages(), 'code'));
Please login to merge, or discard this patch.
src/Generator/AbstractGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $this->generate();
51 51
 
52 52
         // set default language (e.g.: "en") if necessary
53
-        $this->generatedPages->map(function (\Cecil\Collection\Page\Page $page) {
53
+        $this->generatedPages->map(function(\Cecil\Collection\Page\Page $page) {
54 54
             if ($page->getVariable('language') === null) {
55 55
                 $page->setVariable('language', $this->config->getLanguageDefault());
56 56
             }
Please login to merge, or discard this patch.
src/Renderer/Site.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
      */
137 137
     public function getPages(): \Cecil\Collection\Page\Collection
138 138
     {
139
-        return $this->builder->getPages()->filter(function (CollectionPage $page) {
139
+        return $this->builder->getPages()->filter(function(CollectionPage $page) {
140 140
             // We should fix case of virtual pages without language
141 141
             if ($page->getVariable('language') === null && $this->language == $this->config->getLanguageDefault()) {
142 142
                 return true;
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
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
                 $page = clone $this->builder->getPages()->get($pageId);
42 42
             }
43 43
             // collects all pages
44
-            $subPages = $this->builder->getPages()->filter(function (Page $page) use ($language) {
44
+            $subPages = $this->builder->getPages()->filter(function(Page $page) use ($language) {
45 45
                 return $page->getType() == TYPE::PAGE
46 46
                     && $page->isVirtual() === false
47 47
                     && $page->getVariable('exclude') !== true
Please login to merge, or discard this patch.
src/Step/Pages/Render.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         // collects published pages
66 66
         /** @var Page $page */
67
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
67
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
68 68
             return !empty($page->getVariable('published'));
69 69
         });
70 70
         $max = count($filteredPages);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 // renders with Twig
120 120
                 try {
121 121
                     $deprecations = [];
122
-                    set_error_handler(function ($type, $msg) use (&$deprecations) {
122
+                    set_error_handler(function($type, $msg) use (&$deprecations) {
123 123
                         if (E_USER_DEPRECATED === $type) {
124 124
                             $deprecations[] = $msg;
125 125
                         }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     protected function getTranslations(Page $refPage): \Cecil\Collection\Page\Collection
265 265
     {
266 266
         /** @var Page $page */
267
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) use ($refPage) {
267
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) use ($refPage) {
268 268
             return $page->getId() !== $refPage->getId()
269 269
                 && $page->getVariable('langref') == $refPage->getVariable('langref')
270 270
                 && $page->getType() == $refPage->getType()
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 // add generator meta tag
286 286
                 if (!preg_match('/<meta name="generator".*/i', $output)) {
287 287
                     $meta = \sprintf('<meta name="generator" content="Cecil %s" />', Builder::getVersion());
288
-                    $output = preg_replace_callback('/([[:blank:]]+)(<\/head>)/i', function ($matches) use ($meta) {
288
+                    $output = preg_replace_callback('/([[:blank:]]+)(<\/head>)/i', function($matches) use ($meta) {
289 289
                         return str_repeat($matches[1], 2).$meta."\n".$matches[1].$matches[2];
290 290
                     }, $output);
291 291
                 }
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
             //'/href="([A-Za-z0-9_\.\-\/]+)\.md(\#[A-Za-z0-9\-]+)?"/is',
304 304
             // https://regex101.com/r/ycWMe4/1
305 305
             '/href="(\/|)([A-Za-z0-9_\.\-\/]+)\.md(\#[A-Za-z0-9\-]+)?"/is',
306
-            function ($matches) use ($page) {
306
+            function($matches) use ($page) {
307 307
                 // section spage
308 308
                 $hrefPattern = 'href="../%s/%s"';
309 309
                 // root page
Please login to merge, or discard this patch.