Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
38 | public function offsetSet($lang, $value) |
||
39 | { |
||
40 | if (DataType::isLanguageOrRange($lang)) { |
||
41 | if (is_null($value)) { |
||
42 | unset($this->members[$lang]); |
||
43 | } else { |
||
44 | $this->members[$lang] = static::checkMember($value); |
||
45 | } |
||
46 | } else { |
||
47 | throw new InvalidArgumentException( |
||
48 | 'JSKOS\LanguageMap may only use language tags or ranges as index' |
||
49 | ); |
||
50 | } |
||
51 | } |
||
52 | |||
62 |