Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
26 | class CSVWriter extends \SplFileObject |
||
27 | { |
||
28 | /** |
||
29 | * Create a temporary file |
||
30 | */ |
||
31 | 14 | public function __construct() |
|
32 | { |
||
33 | 14 | parent::__construct(tempnam(sys_get_temp_dir(), 'neuralyzer'), 'w'); |
|
34 | 14 | } |
|
35 | |||
36 | /** |
||
37 | * Write a CSV line either by PHP standard or manually when no $enclosure |
||
38 | * @param array $fields |
||
39 | * @return int |
||
40 | */ |
||
41 | 10 | public function write(array $fields): int |
|
55 | } |
||
56 | } |
||
57 |