Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.1755 |
Changes | 0 |
1 | <?php |
||
23 | 6 | protected function parseValue($value): string |
|
24 | { |
||
25 | 6 | $nesting_level = $this->templateKey ?: $this->getNestingLevel(); |
|
26 | |||
27 | 6 | $template_path = $this->getTemplatePath( |
|
28 | 6 | get_class($this->model) . |
|
29 | 6 | ($nesting_level ? '.' . $nesting_level : '') |
|
30 | ); |
||
31 | |||
32 | 6 | return $this->translator->has($template_path) ? $this->translator->trans( |
|
33 | $template_path, |
||
34 | $this->parseAttributesWithKeys($value) |
||
35 | 6 | ) : $this->model->getAttribute($value); |
|
36 | } |
||
37 | |||
50 |