Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
16 | 1 | public function generate(MediaInterface $media, array $parameters) |
|
17 | { |
||
18 | 1 | $parametersFlat = []; |
|
19 | 1 | foreach ($parameters as $k => $v) { |
|
20 | 1 | $parametersFlat[] = $k.'_'.$v; |
|
21 | 1 | } |
|
22 | |||
23 | 1 | return pathinfo($media->getImage(), PATHINFO_FILENAME). |
|
24 | 1 | '/'.implode('-', $parametersFlat). |
|
25 | 1 | '.'.$this->getFormat($parameters); |
|
26 | } |
||
27 | |||
41 |