diff --git a/src/Content/Smilies.php b/src/Content/Smilies.php
index bce403a371..1a058f6375 100644
--- a/src/Content/Smilies.php
+++ b/src/Content/Smilies.php
@@ -93,44 +93,44 @@ class Smilies
];
- $baseUrl = (string)DI::baseUrl();
+ $baseUrl = (string) DI::baseUrl();
$icons = [
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '
',
- '~friendica
',
- 'red
matrix',
- 'red
matrix'
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '~friendica
',
+ 'red
matrix',
+ 'red
matrix'
];
$eventDispatcher = DI::eventDispatcher();
@@ -160,12 +160,12 @@ class Smilies
if (strpos($text, '[nosmile]') !== false || self::noSmilies()) {
return $text;
}
- $smilies = self::getList();
+ $smilies = self::getList();
$normalized = [];
return self::performForEachWordMatch(
array_combine($smilies['texts'], $smilies['icons']),
$text,
- function (string $name, string $image) use($normalized, &$emojis) {
+ function (string $name, string $image) use ($normalized, &$emojis) {
if (array_key_exists($name, $normalized)) {
return $normalized[$name];
}
@@ -181,9 +181,9 @@ class Smilies
$norm = 'smiley' . count($normalized);
}
}
- $shortcode = ':' . $norm . ':';
+ $shortcode = ':' . $norm . ':';
$normalized[$name] = $shortcode;
- $emojis[$norm] = $url;
+ $emojis[$norm] = $url;
return $shortcode;
} else {
$normalized[$name] = $image;
@@ -210,7 +210,7 @@ class Smilies
{
$ord1_bitset = 0;
$ord2_bitset = 0;
- $prefixes = [];
+ $prefixes = [];
foreach ($words as $word => $_) {
if (strlen($word) < 2) {
continue;
@@ -230,7 +230,7 @@ class Smilies
}
$slength = strlen($subject);
- $result = '';
+ $result = '';
// $processed is used to delay string concatenation since appending a char every loop is inefficient.
$processed = 0;
// Find possible starting points for smilies.
@@ -316,7 +316,8 @@ class Smilies
return $s;
}
- private static function noSmilies(): bool {
+ private static function noSmilies(): bool
+ {
return (intval(DI::config()->get('system', 'no_smilies')) ||
(DI::userSession()->getLocalUserId() &&
intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_smilies'))));
@@ -344,7 +345,7 @@ class Smilies
if ($no_images) {
$cleaned = ['texts' => [], 'icons' => []];
- $icons = $smilies['icons'];
+ $icons = $smilies['icons'];
foreach ($icons as $key => $icon) {
if (!strstr($icon, '![]()