| Conditions | 6 |
| Paths | 6 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 73 | public function setOptions(? Iterable $config = null): AdapterInterface |
||
| 74 | { |
||
| 75 | if (null === $config) { |
||
| 76 | return $this; |
||
| 77 | } |
||
| 78 | |||
| 79 | foreach ($config as $option => $value) { |
||
| 80 | switch ($option) { |
||
| 81 | case 'map': |
||
| 82 | $this->map = $value; |
||
| 83 | |||
| 84 | break; |
||
| 85 | case 'attr_sync_cache': |
||
| 86 | $this->attr_sync_cache = (int) $value; |
||
| 87 | |||
| 88 | break; |
||
| 89 | case 'identity_attribute': |
||
| 90 | $this->identity_attribute = $value; |
||
| 91 | |||
| 92 | break; |
||
| 93 | default: |
||
| 94 | throw new InvalidArgumentException('unknown option '.$option.' given'); |
||
| 95 | } |
||
| 96 | } |
||
| 97 | |||
| 98 | return $this; |
||
| 99 | } |
||
| 131 |