| Conditions | 6 |
| Paths | 6 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 63 | public function setOptions(? Iterable $config = null): AdapterInterface |
||
| 64 | { |
||
| 65 | if (null === $config) { |
||
| 66 | return $this; |
||
| 67 | } |
||
| 68 | |||
| 69 | foreach ($config as $option => $value) { |
||
| 70 | switch ($option) { |
||
| 71 | case 'map': |
||
| 72 | $this->map = $value; |
||
| 73 | |||
| 74 | break; |
||
| 75 | case 'attr_sync_cache': |
||
| 76 | $this->attr_sync_cache = (int) $value; |
||
| 77 | |||
| 78 | break; |
||
| 79 | case 'identity_attribute': |
||
| 80 | $this->identity_attribute = (int) $value; |
||
| 81 | |||
| 82 | break; |
||
| 83 | default: |
||
| 84 | throw new InvalidArgumentException('unknown option '.$option.' given'); |
||
| 85 | } |
||
| 86 | } |
||
| 87 | |||
| 88 | return $this; |
||
| 89 | } |
||
| 121 |