Passed
Push — logger ( aacfbb...c62db7 )
by Arnaud
02:40
created
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/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.
src/Util.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public static function joinPath(string ...$path): string
130 130
     {
131
-        array_walk($path, function (&$value) {
131
+        array_walk($path, function(&$value) {
132 132
             $value = str_replace('\\', '/', $value);
133 133
             $value = rtrim($value, '/');
134 134
         });
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public static function joinFile(string ...$path): string
147 147
     {
148
-        array_walk($path, function (&$value) {
148
+        array_walk($path, function(&$value) {
149 149
             $value = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $value);
150 150
             $value = rtrim($value, DIRECTORY_SEPARATOR);
151 151
         });
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     public static function fileGetContents($filename)
210 210
     {
211 211
         set_error_handler(
212
-            function ($severity, $message, $file, $line) {
212
+            function($severity, $message, $file, $line) {
213 213
                 throw new \ErrorException($message, 0, $severity, $file, $line, null);
214 214
             }
215 215
         );
Please login to merge, or discard this patch.
src/Step/PagesGenerate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $this->builder->getLogger()->notice('Generating pages');
41 41
 
42 42
             // loads local generators
43
-            spl_autoload_register(function ($className) {
43
+            spl_autoload_register(function($className) {
44 44
                 $generatorFile = Util::joinFile($this->config->getDestinationDir(), 'generators', "$className.php");
45 45
                 if (file_exists($generatorFile)) {
46 46
                     require $generatorFile;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             });
49 49
 
50 50
             $generators = (array) $this->builder->getConfig()->get('generators');
51
-            array_walk($generators, function ($generator, $priority) use ($generatorManager) {
51
+            array_walk($generators, function($generator, $priority) use ($generatorManager) {
52 52
                 if (!class_exists($generator)) {
53 53
                     $message = sprintf('Unable to load generator "%s"', $generator);
54 54
                     $this->builder->getLogger()->error($message);
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
         $this->builder->getLogger()->notice('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/Generator/ExternalBody.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
      */
26 26
     public function generate(): void
27 27
     {
28
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
28
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
29 29
             return null !== $page->getVariable('external');
30 30
         });
31 31
 
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->builder->getPages()->filter(function (Page $page) {
26
+        $subPages = $this->builder->getPages()->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.