| Total Complexity | 8 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class Emoji extends InlineNode |
||
| 13 | { |
||
| 14 | protected string $type = 'emoji'; |
||
| 15 | private string $shortName; |
||
| 16 | private ?string $id; |
||
| 17 | private ?string $text; |
||
| 18 | |||
| 19 | public function __construct(string $shortName, ?string $id = null, ?string $text = null) |
||
| 20 | { |
||
| 21 | $this->shortName = $shortName; |
||
| 22 | $this->id = $id; |
||
| 23 | $this->text = $text; |
||
| 24 | } |
||
| 25 | |||
| 26 | public static function load(array $data): self |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getShortName(): string |
||
| 35 | { |
||
| 36 | return $this->shortName; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getId(): ?string |
||
| 40 | { |
||
| 41 | return $this->id; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getText(): ?string |
||
| 47 | } |
||
| 48 | |||
| 49 | protected function attrs(): array |
||
| 62 | } |
||
| 63 | } |
||
| 64 |