public function setWithReplacement($withReplacement)
    {
        if (is_bool($withReplacement)) {
            $this->withReplacement = $withReplacement;
        } else {
            $msg = "WithReplacement must be a boolean, '" . gettype($withReplacement) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setWithReplacement($withReplacement)
    {
        if (is_bool($withReplacement)) {
            $this->withReplacement = $withReplacement;
        } else {
            $msg = "WithReplacement must be a boolean, '" . gettype($withReplacement) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setWithReplacement ( $ withReplacement ) { if ( is_bool ( $ withReplacement ) ) { $ this -> withReplacement = $ withReplacement ; } else { $ msg = "WithReplacement must be a boolean, '" . gettype ( $ withReplacement ) . "' given." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set if the selection of items must be with or without replacements.

@param boolean $withReplacement true if it must be with replacements, false otherwise.
@throws \InvalidArgumentException If $withReplacement is not a boolean.
Set if the selection of items must be with or without replacements .