@@ 98-108 (lines=11) @@ | ||
95 | /** |
|
96 | * {@inheritdoc} |
|
97 | */ |
|
98 | public function intersect(SetInterface $set): SetInterface |
|
99 | { |
|
100 | $this->validate($set); |
|
101 | ||
102 | $newSet = clone $this; |
|
103 | $newSet->values = $this->values->intersect( |
|
104 | new Sequence(...$set->toPrimitive()) |
|
105 | ); |
|
106 | ||
107 | return $newSet; |
|
108 | } |
|
109 | ||
110 | /** |
|
111 | * {@inheritdoc} |
|
@@ 156-166 (lines=11) @@ | ||
153 | /** |
|
154 | * {@inheritdoc} |
|
155 | */ |
|
156 | public function diff(SetInterface $set): SetInterface |
|
157 | { |
|
158 | $this->validate($set); |
|
159 | ||
160 | $newSet = clone $this; |
|
161 | $newSet->values = $this->values->diff( |
|
162 | new Sequence(...$set->toPrimitive()) |
|
163 | ); |
|
164 | ||
165 | return $newSet; |
|
166 | } |
|
167 | ||
168 | /** |
|
169 | * {@inheritdoc} |