| Conditions | 4 |
| Paths | 8 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 3 | public function toArray(): array |
|
| 34 | { |
||
| 35 | 3 | $response = [ |
|
| 36 | 3 | 'format' => 'csv', |
|
| 37 | 3 | 'hasHeaderRow' => $this->hasHeaderRow, |
|
| 38 | 3 | ]; |
|
| 39 | |||
| 40 | 3 | if ($this->columns !== null) { |
|
| 41 | 3 | $response['columns'] = $this->columns; |
|
| 42 | } |
||
| 43 | |||
| 44 | 3 | if ($this->keyColumn !== null) { |
|
| 45 | 3 | $response['keyColumn'] = $this->keyColumn; |
|
| 46 | } |
||
| 47 | 3 | if ($this->valueColumn !== null) { |
|
| 48 | 3 | $response['valueColumn'] = $this->valueColumn; |
|
| 49 | } |
||
| 50 | 3 | $response['skipHeaderRows'] = $this->skipHeaderRows; |
|
| 51 | |||
| 52 | 3 | return $response; |
|
| 53 | } |
||
| 54 | } |