@@ -16,10 +16,10 @@ |
||
| 16 | 16 | static $patterns = null; |
| 17 | 17 | static $replacements = null; |
| 18 | 18 | if (is_null($patterns)) { |
| 19 | - $emojiData = include __DIR__ . '/../config/emoji-data.php'; |
|
| 19 | + $emojiData = include __DIR__.'/../config/emoji-data.php'; |
|
| 20 | 20 | $patterns = array_map( |
| 21 | - function ($code) { |
|
| 22 | - return '/[' . $code . ']/u'; |
|
| 21 | + function($code) { |
|
| 22 | + return '/['.$code.']/u'; |
|
| 23 | 23 | }, |
| 24 | 24 | $emojiData |
| 25 | 25 | ); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | */ |
| 62 | 62 | protected function cleanArray(array $data, $keyPrefix = '') |
| 63 | 63 | { |
| 64 | - return collect($data)->map(function ($value, $key) use ($keyPrefix) { |
|
| 64 | + return collect($data)->map(function($value, $key) use ($keyPrefix) { |
|
| 65 | 65 | return $this->cleanValue($keyPrefix.$key, $value); |
| 66 | 66 | })->all(); |
| 67 | 67 | } |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | public function handle() |
| 36 | 36 | { |
| 37 | 37 | $this->getCodes(); |
| 38 | - $content = '<?php' . PHP_EOL . PHP_EOL; |
|
| 39 | - $content .= 'return [' . PHP_EOL; |
|
| 38 | + $content = '<?php'.PHP_EOL.PHP_EOL; |
|
| 39 | + $content .= 'return ['.PHP_EOL; |
|
| 40 | 40 | $seq = 0; |
| 41 | 41 | foreach ($this->_codes as $code => $dec) { |
| 42 | 42 | if ($dec - $seq > 1) { |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | $seq = $dec; |
| 49 | 49 | } |
| 50 | 50 | $content .= $this->getLine($seq); |
| 51 | - $content .= '];' . PHP_EOL; |
|
| 52 | - $filename = realpath(__DIR__ . '/../../config/emoji-data.php'); |
|
| 51 | + $content .= '];'.PHP_EOL; |
|
| 52 | + $filename = realpath(__DIR__.'/../../config/emoji-data.php'); |
|
| 53 | 53 | file_put_contents($filename, $content); |
| 54 | - $this->info(basename($filename) . ' updated.'); |
|
| 54 | + $this->info(basename($filename).' updated.'); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $this->pushHex(dechex($i)); |
| 81 | 81 | } |
| 82 | 82 | } else { |
| 83 | - trigger_error('Invalid code data - ' . $line, E_USER_ERROR); |
|
| 83 | + trigger_error('Invalid code data - '.$line, E_USER_ERROR); |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | asort($this->_codes, SORT_NUMERIC); |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | { |
| 113 | 113 | $text = self::getUnicode($this->from); |
| 114 | 114 | if ($seq != $this->from) { |
| 115 | - $text .= '-' . self::getUnicode($seq); |
|
| 115 | + $text .= '-'.self::getUnicode($seq); |
|
| 116 | 116 | } |
| 117 | - return ' \'' . $text . '\',' . PHP_EOL; |
|
| 117 | + return ' \''.$text.'\','.PHP_EOL; |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -126,6 +126,6 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | private static function getUnicode(int $nubmer): string |
| 128 | 128 | { |
| 129 | - return '\\x{' . sprintf('%04s', dechex($nubmer)) . '}'; |
|
| 129 | + return '\\x{'.sprintf('%04s', dechex($nubmer)).'}'; |
|
| 130 | 130 | } |
| 131 | 131 | } |