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