<?php implode(string $separator, array $array): string
<?php 'class' => 'twemoji', ], $attributes); $attrs = implode(' ', array_map( fn (string $key, string $value): string => "{$key}=\"{$value}\"", array_keys($attributes), array_values($attributes) )); return $this->replace('<img src="%{src}" alt="%{alt}" '.$attrs.' />', $alt); }
<?php '%s/%s/%s.%s', $this->base, $this->type === self::PNG ? '72x72' : 'svg', implode('-', $this->codepoints), $this->type ); }
<?php it('can replace multi codepoint emojis in plain text', function () { $replacer = new Replacer(); assertMatchesTextSnapshot($replacer->text(implode(PHP_EOL, [ 'Hello 👋', 'Hello 👋🏻', 'Hello 👋🏼', 'Hello 👋🏽', 'Hello 👋🏾', 'Hello 👋🏿', ]))->toMarkdown()); });