Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
25 | 2 | public function parse() : AbstractVariable |
|
26 | { |
||
27 | 2 | $src = $this->unparsed['src'] ?? $this->unparsed; |
|
28 | 2 | $alt = $this->unparsed['alt'] ?? null; |
|
29 | |||
30 | 2 | $image = $this->imageFactory->create($src); |
|
31 | |||
32 | 2 | $this->parsed = [ |
|
33 | 2 | 'src' => $image->src(), |
|
34 | 2 | 'srcset' => $image->srcset(), |
|
35 | 2 | 'alt' => $alt, |
|
36 | ]; |
||
37 | |||
38 | 2 | return $this; |
|
39 | } |
||
40 | } |
||
41 |