Test Setup Failed
Pull Request — latest (#3)
by Mark
32:07
created

TwemojiConverter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 5
c 1
b 0
f 1
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace UnicornFail\Emoji;
6
7
use UnicornFail\Emoji\Environment\Environment;
8
use UnicornFail\Emoji\Extension\Twemoji\TwemojiExtension;
9
10
final class TwemojiConverter extends EmojiConverter
11
{
12
    public const CONVERSION_TYPE = TwemojiExtension::CONVERSION_TYPE;
13
14
    /**
15
     * @param array<string, mixed> $config
16
     */
17
    public static function create(array $config = [], bool $setAsDefaultConversionType = true): EmojiConverterInterface
18
    {
19
        $environment = Environment::create($config);
20
        $environment->addExtension(new TwemojiExtension($setAsDefaultConversionType));
21
22
        return new self($environment);
23
    }
24
}
25