| @@ 26-38 (lines=13) @@ | ||
| 23 | return $copy; |
|
| 24 | } |
|
| 25 | ||
| 26 | public function withValue($value) |
|
| 27 | { |
|
| 28 | if ($this->hasValue($value)) { |
|
| 29 | return $this; |
|
| 30 | } |
|
| 31 | ||
| 32 | $this->assertValid([$value]); |
|
| 33 | ||
| 34 | $copy = clone $this; |
|
| 35 | $copy->values[] = $value; |
|
| 36 | ||
| 37 | return $copy; |
|
| 38 | } |
|
| 39 | ||
| 40 | public function withoutValue($value) |
|
| 41 | { |
|
| @@ 30-38 (lines=9) @@ | ||
| 27 | return $copy; |
|
| 28 | } |
|
| 29 | ||
| 30 | public function withValue($value) |
|
| 31 | { |
|
| 32 | $this->assertValid([$value]); |
|
| 33 | ||
| 34 | $copy = clone $this; |
|
| 35 | $copy->values[] = $value; |
|
| 36 | ||
| 37 | return $copy; |
|
| 38 | } |
|
| 39 | ||
| 40 | public function withoutValue($value) |
|
| 41 | { |
|