Passed
Push — master ( a03091...298d7b )
by Nicolaas
26:28 queued 15:07
created
src/Api/ShareThisSimpleProvider.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
             $className = str_replace('ShareLink', '', (string) $option);
198 198
             $className = strtolower($className);
199 199
             $icon = '';
200
-            if (! empty($icons[$className])) {
200
+            if (!empty($icons[$className])) {
201 201
                 $urlLink = $icons[$className];
202 202
                 $url = ModuleResourceLoader::resourceURL($urlLink);
203
-                $icon = DBField::create_field('HTMLText', '<img src="' . $url . '" alt="' . $option . '" />');
203
+                $icon = DBField::create_field('HTMLText', '<img src="'.$url.'" alt="'.$option.'" />');
204 204
             }
205
-            $method = 'get' . $option;
205
+            $method = 'get'.$option;
206 206
             $arrayList->push(
207 207
                 ArrayData::create(
208 208
                     [
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         $this->getShareThisArray($customDescription);
246 246
 
247 247
         return '' !== $this->pageURL ?
248
-            'https://www.facebook.com/sharer/sharer.php?u=' . $this->pageURL . '&t=' . $this->title . ''
248
+            'https://www.facebook.com/sharer/sharer.php?u='.$this->pageURL.'&t='.$this->title.''
249 249
             :
250 250
             '';
251 251
     }
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         $this->getShareThisArray($customDescription);
278 278
 
279 279
         return '' !== $this->pageURL ?
280
-            'https://twitter.com/intent/tweet?source=' . $this->pageURL . '&text=' . $this->titleFull . '' . urlencode(': ') . $this->pageURL
280
+            'https://twitter.com/intent/tweet?source='.$this->pageURL.'&text='.$this->titleFull.''.urlencode(': ').$this->pageURL
281 281
             :
282 282
             '';
283 283
     }
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         $this->getShareThisArray($customDescription);
308 308
 
309 309
         return '' !== $this->pageURL ?
310
-            'https://www.linkedin.com/shareArticle?mini=true&url=' . $this->pageURL . '&summary=' . $this->titleFull . ''
310
+            'https://www.linkedin.com/shareArticle?mini=true&url='.$this->pageURL.'&summary='.$this->titleFull.''
311 311
             :
312 312
             '';
313 313
     }
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         $this->getShareThisArray($customDescription);
338 338
 
339 339
         return '' !== $this->pageURL ?
340
-            'http://www.tumblr.com/share/link?url=' . $this->pageURL . '&name=' . $this->title . '&description=' . $this->description . ''
340
+            'http://www.tumblr.com/share/link?url='.$this->pageURL.'&name='.$this->title.'&description='.$this->description.''
341 341
             :
342 342
             '';
343 343
     }
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
         $this->getShareThisArray($customDescription);
366 366
 
367 367
         return '' !== $this->pageURL ?
368
-            'http://pinterest.com/pin/create/button/?url=' . $this->pageURL . '&description=' . $this->description . '&media=' . $this->media . ''
368
+            'http://pinterest.com/pin/create/button/?url='.$this->pageURL.'&description='.$this->description.'&media='.$this->media.''
369 369
             :
370 370
             '';
371 371
     }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
     {
391 391
         $this->getShareThisArray($customDescription);
392 392
 
393
-        return '' !== $this->pageURL ? 'mailto:?subject=' . $this->title . '&body=' . $this->pageURL . '' : '';
393
+        return '' !== $this->pageURL ? 'mailto:?subject='.$this->title.'&body='.$this->pageURL.'' : '';
394 394
     }
395 395
 
396 396
     /**
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
     {
416 416
         $this->getShareThisArray($customDescription);
417 417
 
418
-        return '' !== $this->pageURL ? 'http://reddit.com/submit?url=' . $this->pageURL . '&title=' . $this->title . '' : '';
418
+        return '' !== $this->pageURL ? 'http://reddit.com/submit?url='.$this->pageURL.'&title='.$this->title.'' : '';
419 419
     }
420 420
 
421 421
     /**
@@ -423,8 +423,8 @@  discard block
 block discarded – undo
423 423
      */
424 424
     public function getShareThisArray(?string $customDescription = ''): array
425 425
     {
426
-        $cacheKey = $this->object->ID . '_' . preg_replace('#[^A-Za-z0-9]#', '_', $customDescription);
427
-        if (! isset(self::$cacheGetShareThisArray[$cacheKey])) {
426
+        $cacheKey = $this->object->ID.'_'.preg_replace('#[^A-Za-z0-9]#', '_', $customDescription);
427
+        if (!isset(self::$cacheGetShareThisArray[$cacheKey])) {
428 428
             //1. link
429 429
             $this->link = $this->shareThisLinkField();
430 430
 
@@ -437,8 +437,8 @@  discard block
 block discarded – undo
437 437
             $this->hashTags = $this->getValuesFromArrayToString('hashTagsArray', 'hash_tags', '#');
438 438
             $this->mentions = $this->getValuesFromArrayToString('mentionsArray', 'mentions');
439 439
             $this->vias = $this->getValuesFromArrayToString('viasArray', 'vias');
440
-            $this->titleFull = trim($this->mentions . ' ' . $this->title . ' ' . $this->hashTags . ' ' . $this->vias);
441
-            $this->descriptionFull = trim($this->mentions . ' ' . $this->description . ' ' . $this->hashTags . ' ' . $this->vias);
440
+            $this->titleFull = trim($this->mentions.' '.$this->title.' '.$this->hashTags.' '.$this->vias);
441
+            $this->descriptionFull = trim($this->mentions.' '.$this->description.' '.$this->hashTags.' '.$this->vias);
442 442
 
443 443
             //return ...
444 444
             self::$cacheGetShareThisArray[$cacheKey] = [
@@ -480,9 +480,9 @@  discard block
 block discarded – undo
480 480
             if ($image && $image->exists()) {
481 481
                 $imageTitle = $useImageTitle ? $image->Title : $this->object->Title;
482 482
 
483
-                return 'http://pinterest.com/pin/create/button/?url=' . urlencode($this->object->AbsoluteLink()) . '&amp;'
484
-                    . 'description=' . urlencode($imageTitle) . '&amp;'
485
-                    . 'media=' . urlencode($image->AbsoluteLink());
483
+                return 'http://pinterest.com/pin/create/button/?url='.urlencode($this->object->AbsoluteLink()).'&amp;'
484
+                    . 'description='.urlencode($imageTitle).'&amp;'
485
+                    . 'media='.urlencode($image->AbsoluteLink());
486 486
             }
487 487
         }
488 488
 
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
         $a = empty($this->{$variable}) ? $this->Config()->get($staticVariable) : $this->{$variable};
495 495
         $str = '';
496 496
         if (is_array($a) && count($a)) {
497
-            $str = $prepender . implode(' ' . $prepender, $a);
497
+            $str = $prepender.implode(' '.$prepender, $a);
498 498
         }
499 499
 
500 500
         return trim($str);
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
         if (is_array($imageMethods) && count($imageMethods)) {
539 539
             foreach ($imageMethods as $imageMethod) {
540 540
                 if ($this->object->hasMethod($imageMethod)) {
541
-                    $imageField = $imageMethod . 'ID';
541
+                    $imageField = $imageMethod.'ID';
542 542
                     if ($this->{$imageField}) {
543 543
                         $image = $this->object->{$imageMethod}();
544 544
                         if ($image && $image->exists()) {
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
         } else {
562 562
             $description = '';
563 563
             $descriptionMethod = $this->descriptionMethod;
564
-            if (! $descriptionMethod) {
564
+            if (!$descriptionMethod) {
565 565
                 $descriptionMethod = Config::inst()->get(
566 566
                     'ShareThisSimpleProvider',
567 567
                     'description_method'
Please login to merge, or discard this patch.
src/Model/ShareThisSimpleExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     public function ShareThisSimpleProvider()
22 22
     {
23 23
         $owner = $this->getOwner();
24
-        if (! isset(self::$_share_this_simple_provider[$owner->ID])) {
24
+        if (!isset(self::$_share_this_simple_provider[$owner->ID])) {
25 25
             self::$_share_this_simple_provider[$owner->ID] = ShareThisSimpleProvider::create($this->owner);
26 26
         }
27 27
 
Please login to merge, or discard this patch.