| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function withField(string $fieldName, $fieldValue): self |
||
| 31 | { |
||
| 32 | $array = $this->extraFields; |
||
| 33 | if (stripos($fieldName, 'x-') === 0) { |
||
| 34 | $array[strtolower($fieldName)] = $fieldValue; |
||
| 35 | } else { |
||
| 36 | $array['x-' . strtolower($fieldName)] = $fieldValue; |
||
| 37 | } |
||
| 38 | return new self($array); |
||
| 39 | } |
||
| 46 |