| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | public function __construct($data, $map) |
||
| 48 | { |
||
| 49 | $this->data = $data; |
||
| 50 | $this->map = $map; |
||
| 51 | |||
| 52 | foreach ($this->data as $k => $data) { |
||
| 53 | foreach ($this->map as $field => $length) { |
||
| 54 | if (array_key_exists($field, $data) === false) { |
||
| 55 | throw new \Exception("Invalid configuration. Field $field not found."); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | } |
||
| 59 | } |
||
| 60 | |||
| 90 |