Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | private function getTranslatedAttributes(array $attributes, ValidationContext $context): array |
||
25 | { |
||
26 | $initialAttribute = $context->getAttribute(); |
||
27 | $translatedAttributes = []; |
||
28 | foreach ($attributes as $attribute) { |
||
29 | $translatedAttributes[] = $context->setAttribute($attribute)->getTranslatedAttribute(); |
||
30 | } |
||
31 | |||
32 | /** @var string[] $translatedAttributes */ |
||
33 | |||
34 | $context->setAttribute($initialAttribute); |
||
35 | |||
36 | return $translatedAttributes; |
||
37 | } |
||
39 |