public function isProperSuperset(Set $B) : bool { $B_array = $B->asArray(); $A∩B = array_intersect_key($this->A, $B_array); $A∖B = array_diff_key($B_array, $this->A); return count($A∩B) === $B->length() && empty($A∖B) && $this != $B; }
/** * @dataProvider dataProviderForIsProperSet */ public function testIsProperSuperset(array $A, array $B) { $setA = new Set($B); $setB = new Set($A); $this->assertFalse($setA->isProperSuperset($setB)); }