| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 3 | protected function writeLocale($locale, array $lines = []) |
|
| 42 | { |
||
| 43 | 3 | $translations = ConvertToTree::fromFlattened($lines); |
|
| 44 | |||
| 45 | 3 | foreach ($translations as $section => $trans) { |
|
| 46 | 3 | $this->filesystem->put( |
|
| 47 | 3 | $locale.'/'.$section.'.php', |
|
| 48 | 3 | "<?php\n\n return ".var_export($trans, true).";\n" |
|
| 49 | ); |
||
| 50 | } |
||
| 51 | 3 | } |
|
| 52 | |||
| 70 |