public function complement(Value $set)
    {
        $complement = $this->value;

        /** @var Value $arg */
        foreach (func_get_args() as $arg) {
            /** @var array $convertedArg */
            $convertedArg = $arg->getSet()->getValue();
            //array_values is needed to make sure the indexes are ordered from 0
            $complement = array_values(array_diff($complement, $convertedArg));
        }

        return new self($complement);
    }
public function complement(Value $set)
    {
        $complement = $this->value;

        /** @var Value $arg */
        foreach (func_get_args() as $arg) {
            /** @var array $convertedArg */
            $convertedArg = $arg->getSet()->getValue();
            //array_values is needed to make sure the indexes are ordered from 0
            $complement = array_values(array_diff($complement, $convertedArg));
        }

        return new self($complement);
    }
public function complement ( Value $ set ) { $ complement = $ this -> value ; /** @var Value $arg */ foreach ( func_get_args ( ) as $ arg ) { /** @var array $convertedArg */ $ convertedArg = $ arg -> getSet ( ) -> getValue ( ) ; //array_values is needed to make sure the indexes are ordered from 0 $ complement = array_values ( array_diff ( $ complement , $ convertedArg ) ) ; } return new self ( $ complement ) ; }
Set complement operator.

Returns a Set which is the complement of this Set with all passed Sets.

@param Value $set,...

@return Set
Set complement operator .