| Conditions | 5 |
| Paths | 5 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 69 | public function setOptions(? Iterable $config = null) : AdapterInterface |
||
| 70 | { |
||
| 71 | if ($config === null) { |
||
| 72 | return $this; |
||
| 73 | } |
||
| 74 | |||
| 75 | foreach ($config as $option => $value) { |
||
| 76 | switch ($option) { |
||
| 77 | case 'map': |
||
| 78 | $this->map = $value; |
||
| 79 | break; |
||
| 80 | |||
| 81 | case 'attr_sync_cache': |
||
| 82 | $this->attr_sync_cache = (int)$value; |
||
| 83 | break; |
||
| 84 | |||
| 85 | default: |
||
| 86 | throw new Exception('unknown option '.$option.' given'); |
||
| 87 | } |
||
| 88 | } |
||
| 89 | |||
| 90 | return $this; |
||
| 91 | } |
||
| 92 | |||
| 115 |