]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Smilies.php
spelling: count
[friendica.git] / src / Content / Smilies.php
index 02abee6cf61d9605fcd7e0a52276a66b35b3c155..c51d9b33058225c95f1b9d57133df26e0c893355 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -218,8 +218,8 @@ class Smilies
                        return $text;
                }
 
-               $text = preg_replace_callback('/<(pre)>(.*?)<\/pre>/ism', 'self::encode', $text);
-               $text = preg_replace_callback('/<(code)>(.*?)<\/code>/ism', 'self::encode', $text);
+               $text = preg_replace_callback('/<(pre)>(.*?)<\/pre>/ism', [self::class, 'encode'], $text);
+               $text = preg_replace_callback('/<(code)>(.*?)<\/code>/ism', [self::class, 'encode'], $text);
 
                if ($no_images) {
                        $cleaned = ['texts' => [], 'icons' => []];
@@ -233,11 +233,11 @@ class Smilies
                        $smilies = $cleaned;
                }
 
-               $text = preg_replace_callback('/&lt;(3+)/', 'self::heartReplaceCallback', $text);
+               $text = preg_replace_callback('/&lt;(3+)/', [self::class, 'heartReplaceCallback'], $text);
                $text = self::strOrigReplace($smilies['texts'], $smilies['icons'], $text);
 
-               $text = preg_replace_callback('/<(code)>(.*?)<\/code>/ism', 'self::decode', $text);
-               $text = preg_replace_callback('/<(pre)>(.*?)<\/pre>/ism', 'self::decode', $text);
+               $text = preg_replace_callback('/<(code)>(.*?)<\/code>/ism', [self::class, 'decode'], $text);
+               $text = preg_replace_callback('/<(pre)>(.*?)<\/pre>/ism', [self::class, 'decode'], $text);
 
                return $text;
        }