| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | public function mergeContext(array $context, bool $override = true): TextInterface |
||
| 55 | 2 | { |
|
| 56 | 2 | if (empty($context)) { |
|
| 57 | 2 | throw new InvalidArgumentException('Context trying to be merged is empty'); |
|
| 58 | 2 | } |
|
| 59 | |||
| 60 | return new self( |
||
| 61 | $this->getContent(), |
||
| 62 | 28 | $this->getEncoding(), |
|
| 63 | $override ? array_merge($this->getContext(), $context) : array_merge($context, $this->getContext()) |
||
| 64 | 28 | ); |
|
| 77 |