Passed
Push — master ( 93065b...5504a0 )
by Arnaud
07:14 queued 02:13
created
config/base.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -79,81 +79,81 @@
 block discarded – undo
79 79
     ],
80 80
     'output' => [
81 81
         'formats'  => [
82
-            [ // e.g.: blog/post-1/index.html
82
+            [// e.g.: blog/post-1/index.html
83 83
                 'name'      => 'html',
84 84
                 'mediatype' => 'text/html',
85 85
                 'filename'  => 'index',
86 86
                 'extension' => 'html',
87 87
             ],
88
-            [ // e.g.: blog/atom.xml
88
+            [// e.g.: blog/atom.xml
89 89
                 'name'      => 'atom',
90 90
                 'mediatype' => 'application/atom+xml',
91 91
                 'filename'  => 'atom',
92 92
                 'extension' => 'xml',
93 93
                 'exclude'   => ['redirect', 'paginated'],
94 94
             ],
95
-            [ // e.g.: blog/rss.xml
95
+            [// e.g.: blog/rss.xml
96 96
                 'name'      => 'rss',
97 97
                 'mediatype' => 'application/rss+xml',
98 98
                 'filename'  => 'rss',
99 99
                 'extension' => 'xml',
100 100
                 'exclude'   => ['redirect', 'paginated'],
101 101
             ],
102
-            [ // e.g.: blog.json
102
+            [// e.g.: blog.json
103 103
                 'name'      => 'json',
104 104
                 'mediatype' => 'application/json',
105 105
                 'extension' => 'json',
106 106
                 'exclude'   => ['redirect'],
107 107
             ],
108
-            [ // e.g.: blog.xml
108
+            [// e.g.: blog.xml
109 109
                 'name'      => 'xml',
110 110
                 'mediatype' => 'application/xml',
111 111
                 'extension' => 'xml',
112 112
                 'exclude'   => ['redirect'],
113 113
             ],
114
-            [ // e.g.: robots.txt
114
+            [// e.g.: robots.txt
115 115
                 'name'      => 'txt',
116 116
                 'mediatype' => 'text/plain',
117 117
                 'extension' => 'txt',
118 118
                 'exclude'   => ['redirect'],
119 119
             ],
120
-            [ // e.g.: blog/post-1/amp/index.html
120
+            [// e.g.: blog/post-1/amp/index.html
121 121
                 'name'      => 'amp',
122 122
                 'mediatype' => 'text/html',
123 123
                 'subpath'   => 'amp',
124 124
                 'filename'  => 'index',
125 125
                 'extension' => 'html',
126 126
             ],
127
-            [ // e.g.: sw.js
127
+            [// e.g.: sw.js
128 128
                 'name'      => 'js',
129 129
                 'mediatype' => 'application/javascript',
130 130
                 'extension' => 'js',
131 131
             ],
132
-            [ // e.g.: manifest.webmanifest
132
+            [// e.g.: manifest.webmanifest
133 133
                 'name'      => 'webmanifest',
134 134
                 'mediatype' => 'application/manifest+json',
135 135
                 'extension' => 'webmanifest',
136 136
             ],
137
-            [ // e.g.: atom.xsl
137
+            [// e.g.: atom.xsl
138 138
                 'name'      => 'xsl',
139 139
                 'mediatype' => 'application/xml',
140 140
                 'extension' => 'xsl',
141 141
             ],
142
-            [ // e.g.: blog/feed.json
142
+            [// e.g.: blog/feed.json
143 143
                 'name'      => 'jsonfeed',
144 144
                 'mediatype' => 'application/json',
145 145
                 'filename'  => 'feed',
146 146
                 'extension' => 'json',
147 147
                 'exclude'   => ['redirect', 'paginated'],
148 148
             ],
149
-            [ // e.g.: video/oembed.json
149
+            [// e.g.: video/oembed.json
150 150
                 'name'      => 'oembed',
151 151
                 'mediatype' => 'application/json+oembed',
152 152
                 'filename'  => 'oembed',
153 153
                 'extension' => 'json',
154 154
                 'exclude'   => ['redirect', 'paginated'],
155 155
             ],
156
-            [ // e.g.: video/embed.html
156
+            [// e.g.: video/embed.html
157 157
                 'name'      => 'embed',
158 158
                 'mediatype' => 'text/html',
159 159
                 'filename'  => 'embed',
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
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     /**
120 120
      * Adds navigation (next and prev) to each pages of a section.
121 121
      */
122
-    protected function addNavigationLinks(PagesCollection $pages, string|null $sortBy = null, bool $circular = false): void
122
+    protected function addNavigationLinks(PagesCollection $pages, string | null $sortBy = null, bool $circular = false): void
123 123
     {
124 124
         $pagesAsArray = $pages->toArray();
125 125
         if ($sortBy === null || $sortBy == 'date' || $sortBy == 'updated') {
Please login to merge, or discard this patch.
src/Renderer/Extension/Core.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      *
303 303
      * @return Asset
304 304
      */
305
-    public function asset($path, array|null $options = null): Asset
305
+    public function asset($path, array | null $options = null): Asset
306 306
     {
307 307
         if (!\is_string($path) && !\is_array($path)) {
308 308
             throw new RuntimeException(\sprintf('Argument of "%s()" must a string or an array.', \Cecil\Util::formatMethodName(__METHOD__)));
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
      *
534 534
      * @throws RuntimeException
535 535
      */
536
-    public function html(array $context, Asset|array $assets, array $attributes = [], array $options = []): string
536
+    public function html(array $context, Asset | array $assets, array $attributes = [], array $options = []): string
537 537
     {
538 538
         $html = array();
539 539
         if (!\is_array($assets)) {
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
     /**
1067 1067
      * Hashing an object, an array or a string (with algo, md5 by default).
1068 1068
      */
1069
-    public function hash(object|array|string $data, $algo = 'md5'): string
1069
+    public function hash(object | array | string $data, $algo = 'md5'): string
1070 1070
     {
1071 1071
         switch (\gettype($data)) {
1072 1072
             case 'object':
Please login to merge, or discard this patch.
config/default.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     'metatags' => [
66 66
         'robots' => 'index,follow', // SEO robots default directive
67 67
     ],
68
-    'pages' => [ // Markdown content management
68
+    'pages' => [// Markdown content management
69 69
         'dir' => 'pages', // pages files directory
70 70
         'ext' => ['md', 'markdown', 'mdown', 'mkdn', 'mkd', 'text', 'txt'], // supported files formats, by extension
71 71
         'exclude' => ['vendor', 'node_modules'], // directories, paths and files name to exclude (accepts globs, strings and regexes)
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
                 'caption' => false, // puts the image in a <figure> element and adds a <figcaption> containing the title
100 100
                 'placeholder' => '', // fill <img> background before loading (`color` or `lqip`)
101 101
                 'class' => '', // puts default CSS class(es) to each image
102
-                'remote' => [ // turns remote images into Assets to process them (disable with `false`)
102
+                'remote' => [// turns remote images into Assets to process them (disable with `false`)
103 103
                     'fallback' => '', // path to the fallback image, stored in assets directory (empty by default)
104 104
                 ],
105 105
             ],
106 106
             'links' => [
107
-                'embed' => [ // turns links in embedded content if possible
107
+                'embed' => [// turns links in embedded content if possible
108 108
                     'enabled' => false,
109 109
                     'video' => ['mp4', 'webm'], // supported video file types, by extension
110 110
                     'audio' => ['mp3', 'ogg', 'wav'], // supported audio file types, by extension
@@ -125,16 +125,16 @@  discard block
 block discarded – undo
125 125
         //    <position> => 'Cecil\Generator\<class>',
126 126
         //],
127 127
     ],
128
-    'data' => [ // data files
128
+    'data' => [// data files
129 129
         'dir' => 'data', // data files directory
130 130
         'ext' => ['yaml', 'yml', 'json', 'xml', 'csv'], // loaded files by extension
131 131
         'load' => true, // enables `site.data` collection
132 132
     ],
133
-    'assets' => [ // assets: CSS, JS, images, etc.
133
+    'assets' => [// assets: CSS, JS, images, etc.
134 134
         'dir' => 'assets', // assets files directory
135 135
         'target' => '', // where processed assets are saved (in output directory)
136 136
         'fingerprint' => true, // enables fingerprinting
137
-        'compile' => [ // Sass files compilation
137
+        'compile' => [// Sass files compilation
138 138
             'style' => 'expanded', // compilation style (`expanded` or `compressed`)
139 139
             'import' => ['sass', 'scss', 'node_modules'], // list of imported directories
140 140
             'sourcemap' => false, // enables sourcemap in debug mode
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         'images' => [
152 152
             'optimize' => false, // enables images optimization with JpegOptim, Optipng, Pngquant 2, SVGO 1, Gifsicle, cwebp, avifenc
153 153
             'quality' => 75, // image quality after optimization or resize
154
-            'responsive' => [ // options of generated responsive images
154
+            'responsive' => [// options of generated responsive images
155 155
                 'widths' => [480, 640, 768, 1024, 1366, 1600, 1920], // `srcset` widths
156 156
                 'sizes' => ['default' => '100vw'], // default `sizes` attribute
157 157
                 'densities' => [1, 2, 3], // `srcset` pixel densities
@@ -166,26 +166,26 @@  discard block
 block discarded – undo
166 166
             //]
167 167
         ],
168 168
     ],
169
-    'static' => [ // static files
169
+    'static' => [// static files
170 170
         'dir' => 'static', // static files directory
171 171
         'target' => '', // subdirectory where files are copied
172 172
         'exclude' => ['sass', 'scss', '*.scss', 'package*.json', 'node_modules'], // excluded files by extension or pattern
173 173
         'load' => false, // enables `site.static` collection
174 174
     ],
175
-    'layouts' => [ // layouts and templates
175
+    'layouts' => [// layouts and templates
176 176
         'dir' => 'layouts', // Twig templates directory
177
-        'images' => [ // how to handle images in templates
177
+        'images' => [// how to handle images in templates
178 178
             'formats' => [], // used by `html` function: adds alternatives image formats as `source` (e.g.: ['avif', 'webp'])
179 179
             'responsive' => false, // used by `html` function: adds responsive images ('width' or 'density') to `srcset` attribute
180 180
         ],
181
-        'translations' => [ // i18n
181
+        'translations' => [// i18n
182 182
             'dir' => 'translations', // translations files directory
183 183
             'formats' => ['yaml', 'mo'], // translations supported formats
184 184
         ],
185
-        'extensions' => [ // list of Twig extensions class
185
+        'extensions' => [// list of Twig extensions class
186 186
             //'<name>' => 'Cecil\Renderer\Extension\<class>',
187 187
         ],
188
-        'components' => [ // components
188
+        'components' => [// components
189 189
             'dir' => 'components', // components directory
190 190
             'ext' => 'twig', // components files extension
191 191
         ],
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         //    '<section>' => '<layout>',
194 194
         //]
195 195
     ],
196
-    'output' => [ // output formats and post process
196
+    'output' => [// output formats and post process
197 197
         'dir' => '_site', // output directory
198 198
         //'formats' => [ // https://cecil.app/documentation/configuration/#formats
199 199
         //    [
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         //        'exclude' => ['variable1', 'variable2'],
205 205
         //    ],
206 206
         //],
207
-        'pagetypeformats' => [ // formats applied by page type
207
+        'pagetypeformats' => [// formats applied by page type
208 208
             'page' => ['html'],
209 209
             'homepage' => ['html', 'atom'],
210 210
             'section' => ['html', 'atom'],
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
         //    '<name>' => 'Cecil\Renderer\PostProcessor\<class>',
216 216
         //],
217 217
     ],
218
-    'cache' => [ // cache management
218
+    'cache' => [// cache management
219 219
         'enabled' => true, // disable with `false`
220 220
         'dir' => '.cache', // cache files root directory
221
-        'assets' => [ // assets cache
221
+        'assets' => [// assets cache
222 222
             'ttl' => null, // assets cache TTL (no expiration by default)
223 223
             'remote' => [
224 224
                 'ttl' => 604800, // remote assets cache TTL (7 days by default)
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         'templates' => true, // disable Twig templates cache with `false`
228 228
         'translations' => true, // disable translations dictionary cache with `false`
229 229
     ],
230
-    'optimize' => [ // files optimization
230
+    'optimize' => [// files optimization
231 231
         'enabled' => false, // enables files optimization
232 232
         'html' => [
233 233
             'enabled' => true, // enables HTML files optimization
Please login to merge, or discard this patch.