Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
12 | 30 | public function __construct(string $value, Emoji $emoji, string $url, ?string $alt = null, ?string $title = null) |
|
13 | { |
||
14 | 30 | parent::__construct($value); |
|
15 | |||
16 | 30 | $this->emoji = $emoji; |
|
17 | |||
18 | 30 | $this->setAttribute('src', $url); |
|
19 | |||
20 | 30 | if ($alt !== null) { |
|
21 | 18 | $this->setAttribute('alt', $alt); |
|
22 | } |
||
23 | |||
24 | 30 | if ($title !== null) { |
|
25 | 18 | $this->setAttribute('title', $title); |
|
26 | } |
||
44 |