Passed
Push — dependabot/composer/twig/twig-... ( 1ba109 )
by
unknown
03:49
created
src/Config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
          * Overrides configuration with environment variables.
63 63
          */
64 64
         $data = $this->getData();
65
-        $applyEnv = function ($array) use ($data) {
65
+        $applyEnv = function($array) use ($data) {
66 66
             $iterator = new \RecursiveIteratorIterator(
67 67
                 new \RecursiveArrayIterator($array),
68 68
                 \RecursiveIteratorIterator::SELF_FIRST
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
             throw new RuntimeException(\sprintf('The default language "%s" is not listed in "languages" key configuration.', $this->getLanguageDefault()));
445 445
         }
446 446
 
447
-        $languages = array_filter($languages, function ($language) {
447
+        $languages = array_filter($languages, function($language) {
448 448
             return !(isset($language['enabled']) && $language['enabled'] === false);
449 449
         });
450 450
 
Please login to merge, or discard this patch.
src/Renderer/Layout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,8 +141,8 @@
 block discarded – undo
141 141
             case PageType::TERM:
142 142
                 $layouts = [
143 143
                     // "taxonomy/$term.$format.$ext", // ie: taxonomy/velo.html.twig
144
-                    "_default/term.$format.$ext",     // ie: _default/term.html.twig
145
-                    "_default/list.$format.$ext",     // ie: _default/list.html.twig
144
+                    "_default/term.$format.$ext", // ie: _default/term.html.twig
145
+                    "_default/list.$format.$ext", // ie: _default/list.html.twig
146 146
                 ];
147 147
                 if ($page->hasVariable('term')) {
148 148
                     $layouts = array_merge(
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
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             $page = clone $this->builder->getPages()->get('index');
32 32
         }
33 33
         // collects all pages
34
-        $subPages = $this->builder->getPages()->filter(function (Page $page) {
34
+        $subPages = $this->builder->getPages()->filter(function(Page $page) {
35 35
             return $page->getType() == TYPE::PAGE
36 36
                 && $page->isVirtual() === false // excludes virtual pages
37 37
                 && $page->getVariable('exclude') !== true;
Please login to merge, or discard this patch.
src/Util/File.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         }
43 43
 
44 44
         set_error_handler(
45
-            function ($severity, $message, $file, $line) {
45
+            function($severity, $message, $file, $line) {
46 46
                 throw new \ErrorException($message, 0, $severity, $file, $line, null);
47 47
             }
48 48
         );
Please login to merge, or discard this patch.
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/Step/Pages/Save.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
     public function process(): void
57 57
     {
58 58
         /** @var Page $page */
59
-        $filteredPages = $this->builder->getPages()->filter(function (Page $page) {
59
+        $filteredPages = $this->builder->getPages()->filter(function(Page $page) {
60 60
             return !empty($page->getVariable('rendered'));
61 61
         });
62 62
         $max = count($filteredPages);
Please login to merge, or discard this patch.
src/Step/Pages/Generate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $generatorManager = new GeneratorManager($this->builder);
47 47
 
48 48
         // loads local generators
49
-        spl_autoload_register(function ($className) {
49
+        spl_autoload_register(function($className) {
50 50
             $generatorFile = Util::joinFile($this->config->getSourceDir(), 'generators', "$className.php");
51 51
             if (file_exists($generatorFile)) {
52 52
                 require $generatorFile;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         });
55 55
 
56 56
         $generators = (array) $this->builder->getConfig()->get('generators');
57
-        array_walk($generators, function ($generator, $priority) use ($generatorManager) {
57
+        array_walk($generators, function($generator, $priority) use ($generatorManager) {
58 58
             if (!class_exists($generator)) {
59 59
                 $message = \sprintf('Unable to load generator "%s".', $generator);
60 60
                 $this->builder->getLogger()->error($message);
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
@@ -119,8 +119,7 @@
 block discarded – undo
119 119
                         $this->url = (string) new self($this->builder, $page, $options);
120 120
                         break;
121 121
                     // asset as string
122
-                    case false !== strpos($value, '.') ? true : false:
123
-                        $this->url = $base.'/'.ltrim($value, '/');
122
+                    case false !== strpos($value, '.') ? true : false : $this->url = $base.'/'.ltrim($value, '/');
124 123
                         break;
125 124
                     // others cases?
126 125
                     default:
Please login to merge, or discard this patch.
src/Assets/Asset.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->builder = $builder;
72 72
         $this->config = $builder->getConfig();
73 73
         $paths = is_array($paths) ? $paths : [$paths];
74
-        array_walk($paths, function ($path) {
74
+        array_walk($paths, function($path) {
75 75
             if (empty($path)) {
76 76
                 throw new RuntimeException('The path parameter of "asset() can\'t be empty."');
77 77
             }
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
             'ext'            => '', // file extension
85 85
             'type'           => '', // file type (e.g.: image, audio, video, etc.)
86 86
             'subtype'        => '', // file media type (e.g.: image/png, audio/mp3, etc.)
87
-            'size'           => 0,  // file size (in bytes)
87
+            'size'           => 0, // file size (in bytes)
88 88
             'content_source' => '', // file content, before transformations
89 89
             'content'        => '', // file content, after transformations
90
-            'width'          => 0,  // width (in pixels) in case of an image
91
-            'height'         => 0,  // height (in pixels) in case of an image
90
+            'width'          => 0, // width (in pixels) in case of an image
91
+            'height'         => 0, // height (in pixels) in case of an image
92 92
         ];
93 93
 
94 94
         // handles options
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 
423 423
             try {
424 424
                 $img = ImageManager::make($assetResized->data['content_source']);
425
-                $img->resize($width, null, function (\Intervention\Image\Constraint $constraint) {
425
+                $img->resize($width, null, function(\Intervention\Image\Constraint $constraint) {
426 426
                     $constraint->aspectRatio();
427 427
                     $constraint->upsize();
428 428
                 });
Please login to merge, or discard this patch.