Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | public function getTranslationKey($pattern, $key, $adminName = null) |
||
16 | { |
||
17 | $translationKey = str_replace('{key}', $key, $pattern); |
||
18 | |||
19 | if (strstr($pattern, '{admin}') && $adminName !== null) { |
||
20 | $translationKey = str_replace('{admin}', $adminName, $translationKey); |
||
21 | } |
||
22 | |||
23 | return $translationKey; |
||
24 | } |
||
25 | } |
||
26 |