| @@ 205-212 (lines=8) @@ | ||
| 202 | * @param EnumSet $other |
|
| 203 | * @return bool |
|
| 204 | */ |
|
| 205 | public function isSubset(EnumSet $other) |
|
| 206 | { |
|
| 207 | if ($this->enumeration !== $other->enumeration) { |
|
| 208 | return false; |
|
| 209 | } |
|
| 210 | ||
| 211 | return ($this->bitset & $other->bitset) === $this->bitset; |
|
| 212 | } |
|
| 213 | ||
| 214 | /** |
|
| 215 | * Check if this EnumSet is a superset of other |
|
| @@ 219-226 (lines=8) @@ | ||
| 216 | * @param EnumSet $other |
|
| 217 | * @return bool |
|
| 218 | */ |
|
| 219 | public function isSuperset(EnumSet $other) |
|
| 220 | { |
|
| 221 | if ($this->enumeration !== $other->enumeration) { |
|
| 222 | return false; |
|
| 223 | } |
|
| 224 | ||
| 225 | return ($this->bitset | $other->bitset) === $this->bitset; |
|
| 226 | } |
|
| 227 | ||
| 228 | /** |
|
| 229 | * Produce a new set with enumerators from both this and other (this | other) |
|
| @@ 187-194 (lines=8) @@ | ||
| 184 | * @param EnumSet $other |
|
| 185 | * @return bool |
|
| 186 | */ |
|
| 187 | public function isSubset(EnumSet $other) |
|
| 188 | { |
|
| 189 | if ($this->enumeration !== $other->enumeration) { |
|
| 190 | return false; |
|
| 191 | } |
|
| 192 | ||
| 193 | return ($this->bitset & $other->bitset) === $this->bitset; |
|
| 194 | } |
|
| 195 | ||
| 196 | /** |
|
| 197 | * Check if this EnumSet is a superset of other |
|
| @@ 201-208 (lines=8) @@ | ||
| 198 | * @param EnumSet $other |
|
| 199 | * @return bool |
|
| 200 | */ |
|
| 201 | public function isSuperset(EnumSet $other) |
|
| 202 | { |
|
| 203 | if ($this->enumeration !== $other->enumeration) { |
|
| 204 | return false; |
|
| 205 | } |
|
| 206 | ||
| 207 | return ($this->bitset | $other->bitset) === $this->bitset; |
|
| 208 | } |
|
| 209 | ||
| 210 | /** |
|
| 211 | * Produce a new set with enumerators from both this and other (this | other) |
|
| @@ 318-325 (lines=8) @@ | ||
| 315 | * @param EnumSet $other |
|
| 316 | * @return bool |
|
| 317 | */ |
|
| 318 | public function isSubset(EnumSet $other) |
|
| 319 | { |
|
| 320 | if ($this->enumeration !== $other->enumeration) { |
|
| 321 | return false; |
|
| 322 | } |
|
| 323 | ||
| 324 | return ($this->bitset & $other->bitset) === $this->bitset; |
|
| 325 | } |
|
| 326 | ||
| 327 | /** |
|
| 328 | * Check if this EnumSet is a superset of other |
|
| @@ 332-339 (lines=8) @@ | ||
| 329 | * @param EnumSet $other |
|
| 330 | * @return bool |
|
| 331 | */ |
|
| 332 | public function isSuperset(EnumSet $other) |
|
| 333 | { |
|
| 334 | if ($this->enumeration !== $other->enumeration) { |
|
| 335 | return false; |
|
| 336 | } |
|
| 337 | ||
| 338 | return ($this->bitset | $other->bitset) === $this->bitset; |
|
| 339 | } |
|
| 340 | ||
| 341 | /** |
|
| 342 | * Produce a new set with enumerators from both this and other (this | other) |
|