| Total Complexity | 1 | 
| Total Lines | 30 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); | ||
| 15 | class Csv | ||
| 16 | { | ||
| 17 | /** @var array */ | ||
| 18 | protected $rawData = []; | ||
| 19 | |||
| 20 | /** | ||
| 21 | * Csv constructor. | ||
| 22 | * | ||
| 23 | * Passed data array should be a two dimensional array only or an exception will be thrown | ||
| 24 | * when the time comes to build the CSV | ||
| 25 | * | ||
| 26 | * $data = [ | ||
| 27 | * ['first_name' => 'John', 'last_name' => 'Doe', 'employee_id' => '742617000027'], | ||
| 28 | * ['first_name' => 'Jane', 'last_name' => 'Jackson', 'employee_id' => '0003645'], | ||
| 29 | * ['first_name' => 'Dede', 'last_name' => 'Gore', 'OMG12324'] | ||
| 30 | * ]; | ||
| 31 | * | ||
| 32 | * OR | ||
| 33 | * | ||
| 34 | * $data = [ | ||
| 35 | * ['John', 'Doe', '742617000027'], | ||
| 36 | * ['Jane', 'Jackson', '01011970'], | ||
| 37 | * ['Dede', 'Gore', 'OMG1234'] | ||
| 38 | * ]; | ||
| 39 | * | ||
| 40 | * @param array $data | ||
| 41 | */ | ||
| 42 | 1 | public function __construct(array $data = []) | |
| 45 | } | ||
| 46 | } |