| Conditions | 5 |
| Paths | 7 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function __construct(array $data = []) |
||
| 29 | { |
||
| 30 | parent::__construct($data); |
||
| 31 | |||
| 32 | if (isset($data['numero_dossier'])) { |
||
| 33 | $this->fileNumber = $data['numero_dossier']; |
||
| 34 | if (strlen($this->fileNumber) > 12) { |
||
| 35 | throw Exception::invalidResponseFileNumber($this->fileNumber); |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | if (isset($data['type_facture'])) { |
||
| 40 | $this->invoiceType = $data['type_facture']; |
||
| 41 | if (!in_array($this->invoiceType, self::INVOICE_TYPES, true)) { |
||
| 42 | throw Exception::invalidResponseInvoiceType($this->invoiceType); |
||
| 43 | } |
||
| 47 |