Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 3 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | 11 | public function writeRow($row) |
|
44 | { |
||
45 | 11 | Assert::isIterable($row, 'Every value of $rows should be an array or an instance of \Traversable.'); |
|
46 | |||
47 | 10 | $separator = ''; |
|
48 | |||
49 | 10 | foreach ($row as $cell) { |
|
50 | 10 | fwrite($this->out, $separator . $this->formatCell($cell)); |
|
51 | |||
52 | 10 | if ('' === $separator) { |
|
53 | 10 | $separator = ','; |
|
54 | 10 | } |
|
55 | 10 | } |
|
56 | |||
57 | 10 | fwrite($this->out, "\r\n"); |
|
58 | 10 | } |
|
59 | |||
78 |