Total Complexity | 5 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class RichTextPhoneNumber extends RichText |
||
15 | { |
||
16 | public const TYPE_NAME = 'richTextPhoneNumber'; |
||
17 | |||
18 | /** |
||
19 | * Text. |
||
20 | * |
||
21 | * @var RichText |
||
22 | */ |
||
23 | protected RichText $text; |
||
24 | |||
25 | /** |
||
26 | * Phone number. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected string $phoneNumber; |
||
31 | |||
32 | public function __construct(RichText $text, string $phoneNumber) |
||
33 | { |
||
34 | parent::__construct(); |
||
35 | |||
36 | $this->text = $text; |
||
37 | $this->phoneNumber = $phoneNumber; |
||
38 | } |
||
39 | |||
40 | public static function fromArray(array $array): RichTextPhoneNumber |
||
45 | ); |
||
46 | } |
||
47 | |||
48 | public function typeSerialize(): array |
||
54 | ]; |
||
55 | } |
||
56 | |||
57 | public function getText(): RichText |
||
60 | } |
||
61 | |||
62 | public function getPhoneNumber(): string |
||
65 | } |
||
66 | } |
||
67 |