Passed
Push — configuration ( 735f13...fdfb73 )
by Arnaud
04:04
created
src/Renderer/Layout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,8 +131,8 @@
 block discarded – undo
131 131
                 $layouts = [
132 132
                     // "taxonomy/$term.$format.$ext",     // e.g.: taxonomy/velo.html.twig
133 133
                     // "taxonomy/$singular.$format.$ext", // e.g.: taxonomy/tag.html.twig
134
-                    "_default/term.$format.$ext",         // e.g.: _default/term.html.twig
135
-                    "_default/list.$format.$ext",         // e.g.: _default/list.html.twig
134
+                    "_default/term.$format.$ext", // e.g.: _default/term.html.twig
135
+                    "_default/list.$format.$ext", // e.g.: _default/list.html.twig
136 136
                 ];
137 137
                 if ($page->hasVariable('term')) {
138 138
                     $layouts = array_merge(["taxonomy/{$page->getVariable('term')}.$format.$ext"], $layouts);
Please login to merge, or discard this patch.
src/Logger/ConsoleLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     /**
61 61
      * {@inheritdoc}
62 62
      */
63
-    public function log($level, string|\Stringable $message, array $context = []): void
63
+    public function log($level, string | \Stringable $message, array $context = []): void
64 64
     {
65 65
         $output = $this->output;
66 66
         $output->getFormatter()->setStyle('text', new OutputFormatterStyle('white'));
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
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
     /**
142 142
      * Adds navigation (next and prev) to section subpages.
143 143
      */
144
-    protected function addNavigationLinks(PagesCollection $pages, string|null $sortBy = null, bool $circular = false): void
144
+    protected function addNavigationLinks(PagesCollection $pages, string | null $sortBy = null, bool $circular = false): void
145 145
     {
146 146
         $pagesAsArray = $pages->toArray();
147 147
         if ($sortBy === null || $sortBy == 'date' || $sortBy == 'updated') {
Please login to merge, or discard this patch.
src/Renderer/Site.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
     /**
185 185
      * Returns the property value(s) of an output format.
186 186
      */
187
-    public function getOutputProperty(string $name, string $property): string|array|null
187
+    public function getOutputProperty(string $name, string $property): string | array | null
188 188
     {
189 189
         return $this->config->getOutputFormatProperty($name, $property);
190 190
     }
Please login to merge, or discard this patch.
src/Logger/PrintLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     /**
47 47
      * {@inheritdoc}
48 48
      */
49
-    public function log($level, string|\Stringable $message, array $context = []): void
49
+    public function log($level, string | \Stringable $message, array $context = []): void
50 50
     {
51 51
         if (!isset($this->verbosityLevelMap[$level])) {
52 52
             throw new InvalidArgumentException(\sprintf('The log level "%s" does not exist.', $level));
Please login to merge, or discard this patch.
config/base.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -83,81 +83,81 @@
 block discarded – undo
83 83
     ],
84 84
     'output' => [
85 85
         'formats'  => [
86
-            [ // e.g.: blog/post-1/index.html
86
+            [// e.g.: blog/post-1/index.html
87 87
                 'name'      => 'html',
88 88
                 'mediatype' => 'text/html',
89 89
                 'filename'  => 'index',
90 90
                 'extension' => 'html',
91 91
             ],
92
-            [ // e.g.: blog/atom.xml
92
+            [// e.g.: blog/atom.xml
93 93
                 'name'      => 'atom',
94 94
                 'mediatype' => 'application/atom+xml',
95 95
                 'filename'  => 'atom',
96 96
                 'extension' => 'xml',
97 97
                 'exclude'   => ['redirect', 'paginated'],
98 98
             ],
99
-            [ // e.g.: blog/rss.xml
99
+            [// e.g.: blog/rss.xml
100 100
                 'name'      => 'rss',
101 101
                 'mediatype' => 'application/rss+xml',
102 102
                 'filename'  => 'rss',
103 103
                 'extension' => 'xml',
104 104
                 'exclude'   => ['redirect', 'paginated'],
105 105
             ],
106
-            [ // e.g.: blog.json
106
+            [// e.g.: blog.json
107 107
                 'name'      => 'json',
108 108
                 'mediatype' => 'application/json',
109 109
                 'extension' => 'json',
110 110
                 'exclude'   => ['redirect'],
111 111
             ],
112
-            [ // e.g.: blog.xml
112
+            [// e.g.: blog.xml
113 113
                 'name'      => 'xml',
114 114
                 'mediatype' => 'application/xml',
115 115
                 'extension' => 'xml',
116 116
                 'exclude'   => ['redirect'],
117 117
             ],
118
-            [ // e.g.: robots.txt
118
+            [// e.g.: robots.txt
119 119
                 'name'      => 'txt',
120 120
                 'mediatype' => 'text/plain',
121 121
                 'extension' => 'txt',
122 122
                 'exclude'   => ['redirect'],
123 123
             ],
124
-            [ // e.g.: blog/post-1/amp/index.html
124
+            [// e.g.: blog/post-1/amp/index.html
125 125
                 'name'      => 'amp',
126 126
                 'mediatype' => 'text/html',
127 127
                 'subpath'   => 'amp',
128 128
                 'filename'  => 'index',
129 129
                 'extension' => 'html',
130 130
             ],
131
-            [ // e.g.: sw.js
131
+            [// e.g.: sw.js
132 132
                 'name'      => 'js',
133 133
                 'mediatype' => 'application/javascript',
134 134
                 'extension' => 'js',
135 135
             ],
136
-            [ // e.g.: manifest.webmanifest
136
+            [// e.g.: manifest.webmanifest
137 137
                 'name'      => 'webmanifest',
138 138
                 'mediatype' => 'application/manifest+json',
139 139
                 'extension' => 'webmanifest',
140 140
             ],
141
-            [ // e.g.: atom.xsl
141
+            [// e.g.: atom.xsl
142 142
                 'name'      => 'xsl',
143 143
                 'mediatype' => 'application/xml',
144 144
                 'extension' => 'xsl',
145 145
             ],
146
-            [ // e.g.: blog/feed.json
146
+            [// e.g.: blog/feed.json
147 147
                 'name'      => 'jsonfeed',
148 148
                 'mediatype' => 'application/json',
149 149
                 'filename'  => 'feed',
150 150
                 'extension' => 'json',
151 151
                 'exclude'   => ['redirect', 'paginated'],
152 152
             ],
153
-            [ // e.g.: video/embed.html
153
+            [// e.g.: video/embed.html
154 154
                 'name'      => 'iframe',
155 155
                 'mediatype' => 'text/html',
156 156
                 'filename'  => 'embed',
157 157
                 'extension' => 'html',
158 158
                 'exclude'   => ['redirect', 'paginated'],
159 159
             ],
160
-            [ // e.g.: video/embed.json
160
+            [// e.g.: video/embed.json
161 161
                 'name'      => 'oembed',
162 162
                 'mediatype' => 'application/json+oembed',
163 163
                 'filename'  => 'embed',
Please login to merge, or discard this patch.
src/Collection/Page/Collection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      *   desc_title: false|true
56 56
      *   reverse: false|true
57 57
      */
58
-    public function sortBy(array|string|null $options): self
58
+    public function sortBy(array | string | null $options): self
59 59
     {
60 60
         $sortBy = \is_string($options) ? $options : $options['variable'] ?? 'date';
61 61
         $sortMethod = \sprintf('sortBy%s', ucfirst(str_replace('updated', 'date', $sortBy)));
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     /**
70 70
      * Sorts pages by date (or 'updated'): the most recent first.
71 71
      */
72
-    public function sortByDate(array|string|null $options = null): self
72
+    public function sortByDate(array | string | null $options = null): self
73 73
     {
74 74
         $opt = [];
75 75
         // backward compatibility (i.e. $options = 'updated')
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * Sorts pages by title (natural sort).
105 105
      */
106
-    public function sortByTitle(array|string|null $options = null): self
106
+    public function sortByTitle(array | string | null $options = null): self
107 107
     {
108 108
         $opt = [];
109 109
         // options
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     /**
118 118
      * Sorts by weight (the heaviest first).
119 119
      */
120
-    public function sortByWeight(array|string|null $options = null): self
120
+    public function sortByWeight(array | string | null $options = null): self
121 121
     {
122 122
         $opt = [];
123 123
         // options
Please login to merge, or discard this patch.
src/Assets/Asset.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @throws RuntimeException
59 59
      */
60
-    public function __construct(Builder $builder, string|array $paths, array|null $options = null)
60
+    public function __construct(Builder $builder, string | array $paths, array | null $options = null)
61 61
     {
62 62
         $this->builder = $builder;
63 63
         $this->config = $builder->getConfig();
@@ -74,20 +74,20 @@  discard block
 block discarded – undo
74 74
             }
75 75
         });
76 76
         $this->data = [
77
-            'file'           => '',    // absolute file path
78
-            'files'          => [],    // bundle: array of files path
79
-            'filename'       => '',    // bundle: filename
80
-            'path'           => '',    // public path to the file
81
-            'url'            => null,  // URL if it's a remote file
77
+            'file'           => '', // absolute file path
78
+            'files'          => [], // bundle: array of files path
79
+            'filename'       => '', // bundle: filename
80
+            'path'           => '', // public path to the file
81
+            'url'            => null, // URL if it's a remote file
82 82
             'missing'        => false, // if file not found but missing allowed: 'missing' is true
83
-            'ext'            => '',    // file extension
84
-            'type'           => '',    // file type (e.g.: image, audio, video, etc.)
85
-            'subtype'        => '',    // file media type (e.g.: image/png, audio/mp3, etc.)
86
-            'size'           => 0,     // file size (in bytes)
87
-            'width'          => 0,     // image width (in pixels)
88
-            'height'         => 0,     // image height (in pixels)
89
-            'exif'           => [],    // exif data
90
-            'content'        => '',    // file content
83
+            'ext'            => '', // file extension
84
+            'type'           => '', // file type (e.g.: image, audio, video, etc.)
85
+            'subtype'        => '', // file media type (e.g.: image/png, audio/mp3, etc.)
86
+            'size'           => 0, // file size (in bytes)
87
+            'width'          => 0, // image width (in pixels)
88
+            'height'         => 0, // image height (in pixels)
89
+            'exif'           => [], // exif data
90
+            'content'        => '', // file content
91 91
         ];
92 92
 
93 93
         // handles options
Please login to merge, or discard this patch.
src/Assets/Cache.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
     public function sanitizeKey(string $key): string
247 247
     {
248 248
         $key = str_replace(['https://', 'http://'], '', $key); // remove protocol (if URL)
249
-        $key = Page::slugify($key);                            // slugify
250
-        $key = trim($key, '/');                                // remove leading/trailing slashes
251
-        $key = str_replace(['\\', '/'], ['-', '-'], $key);     // replace slashes by hyphens
252
-        $key = substr($key, 0, 200);                           // truncate to 200 characters (NTFS filename length limit is 255 characters)
249
+        $key = Page::slugify($key); // slugify
250
+        $key = trim($key, '/'); // remove leading/trailing slashes
251
+        $key = str_replace(['\\', '/'], ['-', '-'], $key); // replace slashes by hyphens
252
+        $key = substr($key, 0, 200); // truncate to 200 characters (NTFS filename length limit is 255 characters)
253 253
 
254 254
         return $key;
255 255
     }
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     /**
299 299
      * Convert the various expressions of a TTL value into duration in seconds.
300 300
      */
301
-    protected function duration(\DateInterval|int|null $ttl): int
301
+    protected function duration(\DateInterval | int | null $ttl): int
302 302
     {
303 303
         if ($ttl === null) {
304 304
             return $this->duration;
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             return $ttl;
308 308
         }
309 309
         if ($ttl instanceof \DateInterval) {
310
-            return (int)$ttl->format('%s');
310
+            return (int) $ttl->format('%s');
311 311
         }
312 312
 
313 313
         throw new \InvalidArgumentException('TTL values must be one of null, int, \DateInterval');
Please login to merge, or discard this patch.