| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class UnsetValue implements DataModifierInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var int|string |
||
| 16 | */ |
||
| 17 | private $key; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param int|string $key |
||
| 21 | */ |
||
| 22 | 8 | public function __construct($key) |
|
| 25 | 8 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param int|string $key |
||
| 29 | * @return self |
||
| 30 | */ |
||
| 31 | 1 | public function withKey($key): self |
|
| 32 | { |
||
| 33 | 1 | $new = clone $this; |
|
| 34 | 1 | $new->key = $key; |
|
| 35 | 1 | return $new; |
|
| 36 | } |
||
| 37 | |||
| 38 | 6 | public function apply(array $data): array |
|
| 42 | } |
||
| 43 | } |
||
| 44 |