Passed
Push — exception ( b5f79d )
by Arnaud
05:28
created
src/Renderer/Site.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
      */
105 105
     public function getPages(): \Cecil\Collection\Page\Collection
106 106
     {
107
-        return $this->builder->getPages()->filter(function (Page $page) {
107
+        return $this->builder->getPages()->filter(function(Page $page) {
108 108
             // We should fix case of virtual pages without language
109 109
             if ($page->getVariable('language') === null && $this->language === $this->config->getLanguageDefault()) {
110 110
                 return true;
Please login to merge, or discard this patch.
config/default.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@  discard block
 block discarded – undo
13 13
     'title'        => 'Site title',
14 14
     'baseline'     => 'Site 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'  => 'Site 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' => [
@@ -155,11 +155,11 @@  discard block
 block discarded – undo
155 155
         'format' => 'yaml',
156 156
     ],
157 157
     'body' => [
158
-        'format' => 'md',         // only Markdown is supported
158
+        'format' => 'md', // only Markdown is supported
159 159
         'toc'    => ['h2', 'h3'], // list of headers to include in Table of contents
160 160
         'images' => [
161 161
             'lazy' => [
162
-                'enabled' => true,  // lazy load images
162
+                'enabled' => true, // lazy load images
163 163
             ],
164 164
             'caption' => [
165 165
                 'enabled' => false, // adds <figcaption> based on image title
@@ -200,17 +200,17 @@  discard block
 block discarded – undo
200 200
     ],
201 201
     'assets' => [
202 202
         'dir'     => 'assets',
203
-        'compile' => [     // Compile Saas
203
+        'compile' => [// Compile Saas
204 204
             'enabled'   => true,
205 205
             'style'     => 'expanded', // 'expanded' or 'compressed',
206 206
             'import'    => ['sass', 'scss', 'node_modules'],
207 207
             'sourcemap' => false, // works in debug mode only
208 208
             //'variables' => ['var' => 'value']
209 209
         ],
210
-        'minify' => [      // Minify CSS and JS
210
+        'minify' => [// Minify CSS and JS
211 211
             'enabled' => true,
212 212
         ],
213
-        'fingerprint' => [ // Add fingerprint
213
+        'fingerprint' => [// Add fingerprint
214 214
             'enabled' => true,
215 215
         ],
216 216
         'target' => 'assets', // target directory of remote and resized assets
@@ -218,13 +218,13 @@  discard block
 block discarded – undo
218 218
             'optimize' => [
219 219
                 'enabled' => false, // enables image optimization (JpegOptim, Optipng, Pngquant 2, SVGO 1, Gifsicle, cwebp)
220 220
             ],
221
-            'quality'    => 85,     // quality of optimized JPEG and PNG, and resized JPEG
221
+            'quality'    => 85, // quality of optimized JPEG and PNG, and resized JPEG
222 222
             'responsive' => [
223 223
                 'enabled' => false, // creates responsive images with `html` filter
224 224
                 'width'   => [
225
-                    'steps' => 5,     // number of steps between each responsives images
226
-                    'min'   => 320,   // minimum width
227
-                    'max'   => 1280,  // maximum width
225
+                    'steps' => 5, // number of steps between each responsives images
226
+                    'min'   => 320, // minimum width
227
+                    'max'   => 1280, // maximum width
228 228
                 ],
229 229
                 'sizes' => [
230 230
                     'default' => '100vw', // default sizes
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/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/Assets/Asset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $this->builder = $builder;
68 68
         $this->config = $builder->getConfig();
69 69
         $paths = is_array($paths) ? $paths : [$paths];
70
-        array_walk($paths, function ($path) {
70
+        array_walk($paths, function($path) {
71 71
             if (empty($path)) {
72 72
                 throw new RuntimeException('The path parameter of "asset() can\'t be empty."');
73 73
             }
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 
412 412
             try {
413 413
                 $img = ImageManager::make($this->data['content_source']);
414
-                $img->resize($size, null, function (\Intervention\Image\Constraint $constraint) {
414
+                $img->resize($size, null, function(\Intervention\Image\Constraint $constraint) {
415 415
                     $constraint->aspectRatio();
416 416
                     $constraint->upsize();
417 417
                 });
Please login to merge, or discard this patch.