Passed
Push — dependabot/composer/phpmd/phpm... ( adc281 )
by
unknown
28:06 queued 23:43
created
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.
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->builder->getPages()->filter(function (Page $page) {
32
+        $filteredPages = $this->builder->getPages()->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/Redirect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function generate(): void
24 24
     {
25
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
25
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
26 26
             return null !== $page->getVariable('redirect')
27 27
                 && $page->getVariable('layout') != 'redirect';
28 28
         });
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
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $generatorManager = new GeneratorManager($this->builder);
46 46
 
47 47
         // loads local generators
48
-        spl_autoload_register(function ($className) {
48
+        spl_autoload_register(function($className) {
49 49
             $generatorFile = Util::joinFile($this->config->getDestinationDir(), 'generators', "$className.php");
50 50
             if (file_exists($generatorFile)) {
51 51
                 require $generatorFile;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         });
54 54
 
55 55
         $generators = (array) $this->builder->getConfig()->get('generators');
56
-        array_walk($generators, function ($generator, $priority) use ($generatorManager) {
56
+        array_walk($generators, function($generator, $priority) use ($generatorManager) {
57 57
             if (!class_exists($generator)) {
58 58
                 $message = sprintf('Unable to load generator "%s"', $generator);
59 59
                 $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
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     public function process()
54 54
     {
55 55
         /** @var Page $page */
56
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
56
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
57 57
             return !empty($page->getVariable('rendered'));
58 58
         });
59 59
         $max = count($filteredPages);
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
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public static function joinPath(string ...$path): string
132 132
     {
133
-        array_walk($path, function (&$value, $key) {
133
+        array_walk($path, function(&$value, $key) {
134 134
             $value = str_replace('\\', '/', $value);
135 135
             $value = rtrim($value, '/');
136 136
             $value = $key == 0 ? $value : ltrim($value, '/');
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public static function joinFile(string ...$path): string
150 150
     {
151
-        array_walk($path, function (&$value, $key) use (&$path) {
151
+        array_walk($path, function(&$value, $key) use (&$path) {
152 152
             $value = str_replace(['\\', '/'], [DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR], $value);
153 153
             $value = rtrim($value, DIRECTORY_SEPARATOR);
154 154
             $value = $key == 0 ? $value : ltrim($value, DIRECTORY_SEPARATOR);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public static function fileGetContents($filename)
218 218
     {
219 219
         set_error_handler(
220
-            function ($severity, $message, $file, $line) {
220
+            function($severity, $message, $file, $line) {
221 221
                 throw new \ErrorException($message, 0, $severity, $file, $line, null);
222 222
             }
223 223
         );
Please login to merge, or discard this patch.
src/Assets/Image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             // creates an image object
84 84
             try {
85 85
                 $img = ImageManager::make($source);
86
-                $img->resize($this->size, null, function (\Intervention\Image\Constraint $constraint) {
86
+                $img->resize($this->size, null, function(\Intervention\Image\Constraint $constraint) {
87 87
                     $constraint->aspectRatio();
88 88
                     $constraint->upsize();
89 89
                 });
Please login to merge, or discard this patch.
src/Step/PagesRender.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
         // collects published pages
67 67
         /** @var Page $page */
68
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
68
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
69 69
             return !empty($page->getVariable('published'));
70 70
         });
71 71
         $max = count($filteredPages);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 // renders with Twig
131 131
                 try {
132 132
                     $deprecations = [];
133
-                    set_error_handler(function ($type, $msg) use (&$deprecations) {
133
+                    set_error_handler(function($type, $msg) use (&$deprecations) {
134 134
                         if (E_USER_DEPRECATED === $type) {
135 135
                             $deprecations[] = $msg;
136 136
                         }
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
         }
310 310
         $rendered = preg_replace_callback(
311 311
             '/href="([A-Za-z0-9_\.\-\/]+)\.md(\#[A-Za-z0-9\-]+)?"/is',
312
-            function ($matches) use ($replace) {
312
+            function($matches) use ($replace) {
313 313
                 return \sprintf($replace, Page::slugify(PrefixSuffix::sub($matches[1])), $matches[2] ?? '');
314 314
             },
315 315
             $rendered
Please login to merge, or discard this patch.