Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
1 | <?php namespace Modules\Core\Internationalisation; |
||
36 | public static function separateLanguages($data) |
||
37 | { |
||
38 | $cleanedData = []; |
||
39 | foreach ($data as $key => $value) { |
||
40 | if (is_array($value)) { |
||
41 | foreach ($value as $lang => $input) { |
||
42 | $cleanedData[$lang][$key] = $input; |
||
43 | } |
||
44 | } else { |
||
45 | $cleanedData[$key] = $value; |
||
46 | } |
||
47 | } |
||
48 | |||
49 | return $cleanedData; |
||
50 | } |
||
51 | |||
69 |