@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | foreach ($options as $option) { |
| 190 | 190 | $className = str_replace('ShareLink', '', (string) $option); |
| 191 | 191 | $className = strtolower($className); |
| 192 | - $method = 'get' . $option; |
|
| 192 | + $method = 'get'.$option; |
|
| 193 | 193 | $arrayList->push( |
| 194 | 194 | ArrayData::create( |
| 195 | 195 | [ |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | $this->getShareThisArray($customDescription); |
| 232 | 232 | |
| 233 | 233 | return '' !== $this->pageURL ? |
| 234 | - 'https://www.facebook.com/sharer/sharer.php?u=' . $this->pageURL . '&t=' . $this->title . '' |
|
| 234 | + 'https://www.facebook.com/sharer/sharer.php?u='.$this->pageURL.'&t='.$this->title.'' |
|
| 235 | 235 | : |
| 236 | 236 | ''; |
| 237 | 237 | } |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $this->getShareThisArray($customDescription); |
| 264 | 264 | |
| 265 | 265 | return '' !== $this->pageURL ? |
| 266 | - 'https://twitter.com/intent/tweet?source=' . $this->pageURL . '&text=' . $this->titleFull . '' . urlencode(': ') . $this->pageURL |
|
| 266 | + 'https://twitter.com/intent/tweet?source='.$this->pageURL.'&text='.$this->titleFull.''.urlencode(': ').$this->pageURL |
|
| 267 | 267 | : |
| 268 | 268 | ''; |
| 269 | 269 | } |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $this->getShareThisArray($customDescription); |
| 294 | 294 | |
| 295 | 295 | return '' !== $this->pageURL ? |
| 296 | - 'https://www.linkedin.com/shareArticle?mini=true&url=' . $this->pageURL . '&summary=' . $this->titleFull . '' |
|
| 296 | + 'https://www.linkedin.com/shareArticle?mini=true&url='.$this->pageURL.'&summary='.$this->titleFull.'' |
|
| 297 | 297 | : |
| 298 | 298 | ''; |
| 299 | 299 | } |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | $this->getShareThisArray($customDescription); |
| 324 | 324 | |
| 325 | 325 | return '' !== $this->pageURL ? |
| 326 | - 'http://www.tumblr.com/share/link?url=' . $this->pageURL . '&name=' . $this->title . '&description=' . $this->description . '' |
|
| 326 | + 'http://www.tumblr.com/share/link?url='.$this->pageURL.'&name='.$this->title.'&description='.$this->description.'' |
|
| 327 | 327 | : |
| 328 | 328 | ''; |
| 329 | 329 | } |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | $this->getShareThisArray($customDescription); |
| 352 | 352 | |
| 353 | 353 | return '' !== $this->pageURL ? |
| 354 | - 'http://pinterest.com/pin/create/button/?url=' . $this->pageURL . '&description=' . $this->description . '&media=' . $this->media . '' |
|
| 354 | + 'http://pinterest.com/pin/create/button/?url='.$this->pageURL.'&description='.$this->description.'&media='.$this->media.'' |
|
| 355 | 355 | : |
| 356 | 356 | ''; |
| 357 | 357 | } |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | { |
| 377 | 377 | $this->getShareThisArray($customDescription); |
| 378 | 378 | |
| 379 | - return '' !== $this->pageURL ? 'mailto:?subject=' . $this->title . '&body=' . $this->pageURL . '' : ''; |
|
| 379 | + return '' !== $this->pageURL ? 'mailto:?subject='.$this->title.'&body='.$this->pageURL.'' : ''; |
|
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | /** |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | { |
| 402 | 402 | $this->getShareThisArray($customDescription); |
| 403 | 403 | |
| 404 | - return '' !== $this->pageURL ? 'http://reddit.com/submit?url=' . $this->pageURL . '&title=' . $this->title . '' : ''; |
|
| 404 | + return '' !== $this->pageURL ? 'http://reddit.com/submit?url='.$this->pageURL.'&title='.$this->title.'' : ''; |
|
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | /** |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | */ |
| 410 | 410 | public function getShareThisArray(?string $customDescription = ''): array |
| 411 | 411 | { |
| 412 | - $cacheKey = $this->object->ID . '_' . preg_replace('#[^A-Za-z0-9]#', '_', $customDescription); |
|
| 412 | + $cacheKey = $this->object->ID.'_'.preg_replace('#[^A-Za-z0-9]#', '_', $customDescription); |
|
| 413 | 413 | if (!isset(self::$cacheGetShareThisArray[$cacheKey])) { |
| 414 | 414 | //1. link |
| 415 | 415 | $this->link = $this->shareThisLinkField(); |
@@ -423,8 +423,8 @@ discard block |
||
| 423 | 423 | $this->hashTags = $this->getValuesFromArrayToString('hashTagsArray', 'hash_tags', '#'); |
| 424 | 424 | $this->mentions = $this->getValuesFromArrayToString('mentionsArray', 'mentions'); |
| 425 | 425 | $this->vias = $this->getValuesFromArrayToString('viasArray', 'vias'); |
| 426 | - $this->titleFull = trim($this->mentions . ' ' . $this->title . ' ' . $this->hashTags . ' ' . $this->vias); |
|
| 427 | - $this->descriptionFull = trim($this->mentions . ' ' . $this->description . ' ' . $this->hashTags . ' ' . $this->vias); |
|
| 426 | + $this->titleFull = trim($this->mentions.' '.$this->title.' '.$this->hashTags.' '.$this->vias); |
|
| 427 | + $this->descriptionFull = trim($this->mentions.' '.$this->description.' '.$this->hashTags.' '.$this->vias); |
|
| 428 | 428 | |
| 429 | 429 | //return ... |
| 430 | 430 | self::$cacheGetShareThisArray[$cacheKey] = [ |
@@ -467,9 +467,9 @@ discard block |
||
| 467 | 467 | $imageTitle = $useImageTitle ? $image->Title : $this->object->Title; |
| 468 | 468 | |
| 469 | 469 | return 'http://pinterest.com/pin/create/button/' |
| 470 | - . '?url=' . urlencode($this->object->AbsoluteLink()) . '&' |
|
| 471 | - . 'description=' . urlencode($imageTitle) . '&' |
|
| 472 | - . 'media=' . urlencode($image->AbsoluteLink()); |
|
| 470 | + . '?url='.urlencode($this->object->AbsoluteLink()).'&' |
|
| 471 | + . 'description='.urlencode($imageTitle).'&' |
|
| 472 | + . 'media='.urlencode($image->AbsoluteLink()); |
|
| 473 | 473 | } |
| 474 | 474 | } |
| 475 | 475 | |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | $a = empty($this->{$variable}) ? $this->Config()->get($staticVariable) : $this->{$variable}; |
| 482 | 482 | $str = ''; |
| 483 | 483 | if (is_array($a) && count($a)) { |
| 484 | - $str = $prepender . implode(' ' . $prepender, $a); |
|
| 484 | + $str = $prepender.implode(' '.$prepender, $a); |
|
| 485 | 485 | } |
| 486 | 486 | |
| 487 | 487 | return trim($str); |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | if (is_array($imageMethods) && count($imageMethods)) { |
| 526 | 526 | foreach ($imageMethods as $imageMethod) { |
| 527 | 527 | if ($this->object->hasMethod($imageMethod)) { |
| 528 | - $imageField = $imageMethod . 'ID'; |
|
| 528 | + $imageField = $imageMethod.'ID'; |
|
| 529 | 529 | if ($this->{$imageField}) { |
| 530 | 530 | $image = $this->object->{$imageMethod}(); |
| 531 | 531 | if ($image && $image->exists()) { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function ShareThisSimpleProvider() |
| 29 | 29 | { |
| 30 | - if (! isset(self::$_share_this_simple_provider[$this->getOwner()->ID])) { |
|
| 30 | + if (!isset(self::$_share_this_simple_provider[$this->getOwner()->ID])) { |
|
| 31 | 31 | self::$_share_this_simple_provider[$this->getOwner()->ID] = ShareThisSimpleProvider::create($this->owner); |
| 32 | 32 | } |
| 33 | 33 | |