| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 2 | public function __invoke(ShortcodeInterface $shortcode) |
|
| 28 | { |
||
| 29 | 2 | $args = $shortcode->getParameters(); |
|
| 30 | 2 | $delimiter = $this->delimiter; |
|
| 31 | $keys = array_map(function($key) use($delimiter) { return $delimiter.$key.$delimiter; }, array_keys($args)); |
||
| 32 | /** @var string[] $values */ |
||
| 33 | 2 | $values = array_values($args); |
|
| 34 | |||
| 35 | 2 | return str_replace($keys, $values, (string)$shortcode->getContent()); |
|
| 36 | } |
||
| 37 | } |
||
| 38 |