Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 21 | public function extend(Dictionary $dictionary): void |
|
33 | { |
||
34 | 21 | if ($this->lang !== $dictionary->getLang()) { |
|
35 | 3 | throw new InvalidArgumentException(sprintf('Current dictionary lang (%s) does not match to extend dictionary lang (%s)', $this->lang, $dictionary->getLang())); |
|
36 | } |
||
37 | |||
38 | 18 | $this->records = array_merge($this->records, $dictionary->getRecords()); |
|
39 | 18 | } |
|
46 |