Conditions | 6 |
Paths | 4 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 6.2163 |
Changes | 0 |
1 | <?php |
||
26 | 2 | protected function streamWrite($stream, array $record): void |
|
27 | { |
||
28 | 2 | if (is_array($record['formatted'])) { |
|
29 | 1 | foreach ($record['formatted'] as $key => $info) { |
|
30 | 1 | if (is_array($info)) { |
|
31 | 1 | $record['formatted'][$key] = json_encode($info); |
|
32 | } |
||
33 | } |
||
34 | } |
||
35 | 2 | $formatted = (array)$record['formatted']; |
|
36 | 2 | if (version_compare(PHP_VERSION, '5.5.4', '>=') && !defined('HHVM_VERSION')) { |
|
37 | 2 | fputcsv($stream, $formatted, static::DELIMITER, static::ENCLOSURE, static::ESCAPE_CHAR); |
|
38 | 2 | return; |
|
39 | } |
||
40 | fputcsv($stream, $formatted, static::DELIMITER, static::ENCLOSURE); |
||
41 | } |
||
42 | |||
53 |