Conditions | 4 |
Paths | 6 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function dump(\ArrayObject $data, array $types) |
||
17 | { |
||
18 | $result = []; |
||
19 | foreach ($data as $key => $value) { |
||
20 | if (!isset($types[$key])) { |
||
21 | continue; |
||
22 | } |
||
23 | |||
24 | $type = $types[$key]; |
||
25 | $dump = $this->valueDumper->get($type); |
||
26 | |||
27 | $result[] = sprintf('%s=%s', $key, $dump($value)); |
||
28 | } |
||
29 | |||
30 | if (!empty($result)) { |
||
31 | return implode(',', $result); |
||
32 | } |
||
33 | } |
||
34 | } |
||
35 |