@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * |
| 38 | 38 | * @param string $smileys_url |
| 39 | 39 | */ |
| 40 | - public function __construct($smileys_url = '') |
|
| 40 | + public function __construct ($smileys_url = '') |
|
| 41 | 41 | { |
| 42 | 42 | parent::__construct(); |
| 43 | 43 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @param string $string |
| 60 | 60 | * @return string |
| 61 | 61 | */ |
| 62 | - public function emojiNameToImage($string) |
|
| 62 | + public function emojiNameToImage ($string) |
|
| 63 | 63 | { |
| 64 | 64 | $emoji = self::instance(); |
| 65 | 65 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @param string $string |
| 95 | 95 | * @return string |
| 96 | 96 | */ |
| 97 | - public function keyboardEmojiToImage($string) |
|
| 97 | + public function keyboardEmojiToImage ($string) |
|
| 98 | 98 | { |
| 99 | 99 | $string = $this->emojiFromHTML($string); |
| 100 | 100 | |
@@ -110,9 +110,9 @@ discard block |
||
| 110 | 110 | * @param string $string |
| 111 | 111 | * @return string |
| 112 | 112 | */ |
| 113 | - public function emojiFromHTML($string) |
|
| 113 | + public function emojiFromHTML ($string) |
|
| 114 | 114 | { |
| 115 | - $result = preg_replace_callback('~&#(\d+);|&#x([0-9a-fA-F]+);~', function ($match) { |
|
| 115 | + $result = preg_replace_callback('~&#(\d+);|&#x([0-9a-fA-F]+);~', function($match) { |
|
| 116 | 116 | // See if we have an Emoji version of this HTML entity |
| 117 | 117 | $entity = !empty($match[1]) ? dechex($match[1]) : $match[2]; |
| 118 | 118 | $found = $this->findEmojiByCode($entity); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * @param $hex |
| 138 | 138 | * @return string|false |
| 139 | 139 | */ |
| 140 | - public function findEmojiByCode($hex) |
|
| 140 | + public function findEmojiByCode ($hex) |
|
| 141 | 141 | { |
| 142 | 142 | $this->loadEmoji(); |
| 143 | 143 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * @param array $m results from preg_replace_callback or other array |
| 160 | 160 | * @return string |
| 161 | 161 | */ |
| 162 | - public function emojiToImage($m) |
|
| 162 | + public function emojiToImage ($m) |
|
| 163 | 163 | { |
| 164 | 164 | // No :tag: found or not a complete result, return |
| 165 | 165 | if (!is_array($m) || empty($m[2])) |
@@ -202,9 +202,9 @@ discard block |
||
| 202 | 202 | * @param $string |
| 203 | 203 | * @return string|string[]|null |
| 204 | 204 | */ |
| 205 | - public function emojiFromUni($string) |
|
| 205 | + public function emojiFromUni ($string) |
|
| 206 | 206 | { |
| 207 | - $result = preg_replace_callback('~\p{S}~u', function ($match) { |
|
| 207 | + $result = preg_replace_callback('~\p{S}~u', function($match) { |
|
| 208 | 208 | $hex_str = $this->unicodeCharacterToNumber($match[0]); |
| 209 | 209 | $found = $this->findEmojiByCode($hex_str); |
| 210 | 210 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | * @param string $code |
| 231 | 231 | * @return string |
| 232 | 232 | */ |
| 233 | - public function unicodeCharacterToNumber($code) |
|
| 233 | + public function unicodeCharacterToNumber ($code) |
|
| 234 | 234 | { |
| 235 | 235 | $points = []; |
| 236 | 236 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | * @param $c |
| 251 | 251 | * @return false|int |
| 252 | 252 | */ |
| 253 | - private function uniord($c) |
|
| 253 | + private function uniord ($c) |
|
| 254 | 254 | { |
| 255 | 255 | $ord0 = ord($c[0]); |
| 256 | 256 | if ($ord0 >= 0 && $ord0 <= 127) |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | /** |
| 283 | 283 | * Load the base emoji tags file and load to PHP array |
| 284 | 284 | */ |
| 285 | - public function loadEmoji() |
|
| 285 | + public function loadEmoji () |
|
| 286 | 286 | { |
| 287 | 287 | global $settings; |
| 288 | 288 | |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | * |
| 311 | 311 | * @return void |
| 312 | 312 | */ |
| 313 | - private function _checkCache() |
|
| 313 | + private function _checkCache () |
|
| 314 | 314 | { |
| 315 | 315 | if (!empty($this->shortcode_replace)) |
| 316 | 316 | { |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | * |
| 330 | 330 | * @return \ElkArte\Emoji |
| 331 | 331 | */ |
| 332 | - public static function instance() |
|
| 332 | + public static function instance () |
|
| 333 | 333 | { |
| 334 | 334 | if (self::$instance === null) |
| 335 | 335 | { |