Passed
Push — master ( 72fe55...4d626e )
by Mark
01:41 queued 12s
created
conf/metadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,4 +37,4 @@
 block discarded – undo
37 37
         'zh_HKS', 'zh_HKT', 'zh_SGS', 'zh_TW'
38 38
     )
39 39
 );
40
-$meta['fbAppId']           = array('string');
40
+$meta['fbAppId'] = array('string');
Please login to merge, or discard this patch.
action.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function handleTplMetaheaderOutput(Doku_Event $event, $param): void {
57 57
         global $ID, $conf, $INFO;
58 58
 
59
-        if(!page_exists($ID)) {
59
+        if (!page_exists($ID)) {
60 60
             return;
61 61
         }
62 62
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         );
79 79
 
80 80
         $desc = p_get_metadata($ID, 'description', true);
81
-        if(!empty($desc)) {
81
+        if (!empty($desc)) {
82 82
             $desc                  = str_replace("\n", " ", $desc['abstract']);
83 83
             $event->data['meta'][] = array(
84 84
                 'name'    => 'twitter:description',
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             );
87 87
         }
88 88
 
89
-        if($this->getConf('twitterUserName') !== '') {
89
+        if ($this->getConf('twitterUserName') !== '') {
90 90
             $event->data['meta'][] = array(
91 91
                 'name'    => 'twitter:creator',
92 92
                 'content' => $this->getConf('twitterUserName'),
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             'property' => 'og:title',
134 134
             'content'  => p_get_metadata($ID, 'title', true),
135 135
         );
136
-        if(!empty($desc)) {
136
+        if (!empty($desc)) {
137 137
             $event->data['meta'][] = array(
138 138
                 'property' => 'og:description',
139 139
                 'content'  => $desc,
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
 //            'content'  => p_get_metadata($ID, 'user', true),
174 174
 //        );
175 175
         $_subject = p_get_metadata($ID, 'subject', true);
176
-        if(!empty($_subject)) {
177
-            if(!is_array($_subject)) {
176
+        if (!empty($_subject)) {
177
+            if (!is_array($_subject)) {
178 178
                 $_subject = array($_subject);
179 179
             }
180
-            foreach($_subject as $tag) {
180
+            foreach ($_subject as $tag) {
181 181
                 $event->data['meta'][] = array(
182 182
                     'property' => 'article:tag',
183 183
                     'content'  => $tag,
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $geotags = p_get_metadata($ID, 'geo', true);
190 190
         $lat     = $geotags['lat'];
191 191
         $lon     = $geotags['lon'];
192
-        if(!(empty($lat) && empty($lon))) {
192
+        if (!(empty($lat) && empty($lon))) {
193 193
             $event->data['meta'][] = array(
194 194
                 'property' => 'place:location:latitude',
195 195
                 'content'  => $lat,
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         }
202 202
         // see https://developers.facebook.com/docs/opengraph/property-types/#geopoint
203 203
         $alt = $geotags['alt'];
204
-        if(!empty($alt)) {
204
+        if (!empty($alt)) {
205 205
             // facebook expects feet...
206 206
             $alt *= 3.2808;
207 207
             $event->data['meta'][] = array(
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
         // optional facebook app ID
229 229
         $appId = $this->getConf('fbAppId');
230
-        if(!empty($appId)) {
230
+        if (!empty($appId)) {
231 231
             $event->data['meta'][] = array(
232 232
                 'property' => 'fb:app_id',
233 233
                 'content'  => $appId,
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
         $rel = p_get_metadata($ID, 'relation', true);
247 247
         $img = $rel['firstimage'];
248 248
 
249
-        if(empty($img)) {
249
+        if (empty($img)) {
250 250
             $img = $this->getConf('fallbackImage');
251
-            if(strpos($img, "http") === 0) {
251
+            if (strpos($img, "http") === 0) {
252 252
                 // don't use ml() as this results in a HTTP redirect after
253 253
                 //   hitting the wiki making the card image fail.
254 254
                 return $img;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         $imgID = $rel['firstimage'];
271 271
         $alt   = "";
272 272
 
273
-        if(!empty($imgID)) {
273
+        if (!empty($imgID)) {
274 274
             require_once(DOKU_INC . 'inc/JpegMeta.php');
275 275
             $jpegmeta = new JpegMeta(mediaFN($imgID));
276 276
             $tags     = array(
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
                 'IPTC.Headline',
282 282
                 'Xmp.dc:title'
283 283
             );
284
-            $alt      = media_getTag($tags, $jpegmeta, "");
284
+            $alt = media_getTag($tags, $jpegmeta, "");
285 285
         }
286 286
         return htmlspecialchars($alt);
287 287
     }
Please login to merge, or discard this patch.
_test/action.test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     }
36 36
 
37 37
     public function testHeaders(): void {
38
-        $request  = new TestRequest();
38
+        $request = new TestRequest();
39 39
         $params = array(
40 40
             'id' => 'wiki:dokuwiki'
41 41
         );
Please login to merge, or discard this patch.