Conditions | 5 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function transform($data) |
||
24 | { |
||
25 | return collect($data)->mapWithKeys(function ($value, $key) { |
||
26 | if (!count($this->config['properties']) || (count($this->config['properties']) && in_array($key, $this->config['properties']))) { |
||
27 | return [preg_replace($this->config['pattern'], $this->config['replacement'], $key) => !is_array($value) ? $value : $this->transform($value)]; |
||
28 | } |
||
29 | })->toArray(); |
||
30 | } |
||
32 |