| Conditions | 4 |
| Paths | 5 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace jlourenco\support\Helpers; |
||
| 6 | public function save($items, $environment, $group, $namespace = null) |
||
| 7 | { |
||
| 8 | $path = $this->getPath($namespace); |
||
| 9 | |||
| 10 | if (is_null($path)) |
||
| 11 | return; |
||
| 12 | |||
| 13 | $file = (!$environment || ($environment == 'production')) ? "{$path}/{$group}.php" : "{$path}/{$environment}/{$group}.php"; |
||
| 14 | |||
| 15 | $this->files->put($file, '<?php return ' . var_export($items, true) . ';'); |
||
| 16 | } |
||
| 17 | |||
| 18 | } |