Passed
Push — dependabot/composer/phpstan/ph... ( d1f0da )
by
unknown
04:26
created
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.
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'        => '',
14 14
     'baseline'     => '',
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'  => '',
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/Command/Serve.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
         $buildProcess->setTty(Process::isTtySupported());
120 120
         $buildProcess->setPty(Process::isPtySupported());
121 121
 
122
-        $processOutputCallback = function ($type, $data) use ($output) {
122
+        $processOutputCallback = function($type, $data) use ($output) {
123 123
             $output->write($data, false, OutputInterface::OUTPUT_RAW);
124 124
         };
125 125
 
Please login to merge, or discard this patch.
src/Step/PagesRender.php 1 patch
Spacing   +4 added lines, -4 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
                         }
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                 // add generator meta tag
292 292
                 if (!preg_match('/<meta name="generator".*/i', $rendered)) {
293 293
                     $meta = \sprintf('<meta name="generator" content="Cecil %s" />', Builder::getVersion());
294
-                    $rendered = preg_replace_callback('/([[:blank:]]+)(<\/head>)/i', function ($matches) use ($meta) {
294
+                    $rendered = preg_replace_callback('/([[:blank:]]+)(<\/head>)/i', function($matches) use ($meta) {
295 295
                         return str_repeat($matches[1], 2).$meta."\n".$matches[1].$matches[2];
296 296
                     }, $rendered);
297 297
                 }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         }
311 311
         $rendered = preg_replace_callback(
312 312
             '/href="([A-Za-z0-9_\.\-\/]+)\.md(\#[A-Za-z0-9\-]+)?"/is',
313
-            function ($matches) use ($replace) {
313
+            function($matches) use ($replace) {
314 314
                 return \sprintf($replace, Page::slugify(PrefixSuffix::sub($matches[1])), $matches[2] ?? '');
315 315
             },
316 316
             $rendered
Please login to merge, or discard this patch.
src/Collection/Taxonomy/Term.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function sortByDate(): self
54 54
     {
55
-        return $this->usort(function ($a, $b) {
55
+        return $this->usort(function($a, $b) {
56 56
             if ($a['date'] == $b['date']) {
57 57
                 return 0;
58 58
             }
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
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public function filterBy(PagesCollection $pages, string $variable, string $value): CollectionInterface
202 202
     {
203
-        $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) {
203
+        $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) {
204 204
             $notVirtual = false;
205 205
             if (!$page->isVirtual()) {
206 206
                 $notVirtual = true;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      */
243 243
     public function sortByWeight(\Traversable $collection): array
244 244
     {
245
-        $callback = function ($a, $b) {
245
+        $callback = function($a, $b) {
246 246
             if (!isset($a['weight'])) {
247 247
                 $a['weight'] = 0;
248 248
             }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
      */
272 272
     public function sortByDate(\Traversable $collection): array
273 273
     {
274
-        $callback = function ($a, $b) {
274
+        $callback = function($a, $b) {
275 275
             if ($a['date'] == $b['date']) {
276 276
                 return 0;
277 277
             }
Please login to merge, or discard this patch.
src/Assets/Url.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@
 block discarded – undo
105 105
                         $this->url = $value;
106 106
                         break;
107 107
                     // asset as string
108
-                    case false !== strpos($value, '.') ? true : false :
109
-                        $this->url = $base.'/'.ltrim($value, '/');
108
+                    case false !== strpos($value, '.') ? true : false : $this->url = $base.'/'.ltrim($value, '/');
110 109
                         break;
111 110
                     // Page ID as string
112 111
                     case $this->builder->getPages()->has($pageId):
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->getSourceDir(), '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/Generator/Section.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                 // cascade
56 56
                 if ($page->hasVariable('cascade')) {
57 57
                     $cascade = $page->getVariable('cascade');
58
-                    $pages->map(function (Page $page) use ($cascade) {
58
+                    $pages->map(function(Page $page) use ($cascade) {
59 59
                         foreach ($cascade as $key => $value) {
60 60
                             if (!$page->hasVariable($key)) {
61 61
                                 $page->setVariable($key, $value);
Please login to merge, or discard this patch.