Passed
Push — fix-code ( f7c93d...14bbd2 )
by Arnaud
06:35 queued 01:02
created
src/Command/Command.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
      */
180 180
     public function messageCallback(OutputInterface $output)
181 181
     {
182
-        return function ($code, $message = '', $itemsCount = 0, $itemsMax = 0) use ($output) {
182
+        return function($code, $message = '', $itemsCount = 0, $itemsMax = 0) use ($output) {
183 183
             if (strpos($code, '_PROGRESS') !== false) {
184 184
                 if ($output->isVerbose()) {
185 185
                     if ($itemsCount > 0) {
Please login to merge, or discard this patch.
src/Step/DataLoad.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/Command/ShowContent.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
         $dataDir = (string) $this->getBuilder($output)->getConfig()->get('data.dir');
48 48
 
49 49
         // format output
50
-        $unicodeTreePrefix = function (RecursiveTreeIterator $tree) {
50
+        $unicodeTreePrefix = function(RecursiveTreeIterator $tree) {
51 51
             $prefixParts = [
52 52
                 RecursiveTreeIterator::PREFIX_LEFT         => ' ',
53 53
                 RecursiveTreeIterator::PREFIX_MID_HAS_NEXT => '│ ',
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
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         }
28 28
 
29 29
         // filter pages: home, sections and terms
30
-        $filteredPages = $this->pagesCollection->filter(function (Page $page) {
30
+        $filteredPages = $this->pagesCollection->filter(function(Page $page) {
31 31
             return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION, Type::TERM]);
32 32
         });
33 33
         /** @var Page $page */
Please login to merge, or discard this patch.
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
             $message = sprintf('"%s" theme: no config file', $theme);
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, 0, $severity, $file, $line, null);
49 49
                     }
50 50
                 );
Please login to merge, or discard this patch.
src/Collection/Page/Collection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function all(): self
22 22
     {
23
-        $filteredPages = $this->filter(function (Page $page) {
23
+        $filteredPages = $this->filter(function(Page $page) {
24 24
             if ($page->isVirtual() === false) {
25 25
                 return true;
26 26
             }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function sortByDate(): self
38 38
     {
39
-        return $this->usort(function ($a, $b) {
39
+        return $this->usort(function($a, $b) {
40 40
             if (!isset($a['date'])) {
41 41
                 return -1;
42 42
             }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function sortByTitle(): self
60 60
     {
61
-        return $this->usort(function ($a, $b) {
61
+        return $this->usort(function($a, $b) {
62 62
             return strnatcmp($a['title'], $b['title']);
63 63
         });
64 64
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function sortByWeight(): self
72 72
     {
73
-        return $this->usort(function ($a, $b) {
73
+        return $this->usort(function($a, $b) {
74 74
             if (!isset($a['weight'])) {
75 75
                 return 1;
76 76
             }
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
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         // collect published pages
57 57
         /* @var $page Page */
58
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
58
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
59 59
             return !empty($page->getVariable('published'));
60 60
         });
61 61
         $max = count($filteredPages);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         // https://regex101.com/r/dZ02zO/5
268 268
         $rendered = preg_replace_callback(
269 269
             '/href="([A-Za-z0-9_\.\-\/]+)\.md(\#[A-Za-z0-9\-]+)?"/is',
270
-            function ($matches) {
270
+            function($matches) {
271 271
                 return \sprintf('href="../%s/%s"', Page::slugify(PrefixSuffix::sub($matches[1])), $matches[2] ?? '');
272 272
             },
273 273
             $rendered
Please login to merge, or discard this patch.
src/Builder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     public function setMessageCallback(\Closure $messageCallback = null)
313 313
     {
314 314
         if ($messageCallback === null) {
315
-            $messageCallback = function ($code, $message = '', $itemsCount = 0, $itemsMax = 0) {
315
+            $messageCallback = function($code, $message = '', $itemsCount = 0, $itemsMax = 0) {
316 316
                 switch ($code) {
317 317
                     case 'CONFIG':
318 318
                     case 'LOCATE':
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
     public function getLog(int $type = 0): ?array
417 417
     {
418 418
         if (is_array($this->log)) {
419
-            return array_filter($this->log, function ($key) use ($type) {
419
+            return array_filter($this->log, function($key) use ($type) {
420 420
                 return $key['type'] <= $type;
421 421
             });
422 422
         }
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
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
      */
112 112
     public function getPages(): \Cecil\Collection\Page\Collection
113 113
     {
114
-        return $this->builder->getPages()->filter(function (Page $page) {
114
+        return $this->builder->getPages()->filter(function(Page $page) {
115 115
             return $page->getVariable('published');
116 116
         });
117 117
     }
Please login to merge, or discard this patch.