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