We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 2 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function format(string $template, $input, array $parameters): string |
||
43 | { |
||
44 | $parameters['name'] = $parameters['name'] ?? stringify($input); |
||
45 | |||
46 | return preg_replace_callback( |
||
47 | '/{{(\w+)}}/', |
||
48 | function ($match) use ($parameters) { |
||
49 | if (!isset($parameters[$match[1]])) { |
||
50 | return $match[0]; |
||
51 | } |
||
52 | |||
53 | return $this->parameterStringifier->stringify($match[1], $parameters[$match[1]]); |
||
54 | }, |
||
55 | call_user_func($this->translator, $template) |
||
56 | ); |
||
59 |