public function generate(int $iterations = 1, bool $unwrapSingle = true)
    {
        list ($this->min, $this->max) = $this->prepareMinMax();

        $this->iterations = $iterations = max(1, $iterations);

        $array = $this->performGenerate($iterations);

        if ($this->unique) {
            $array = $this->fillNonUniqueIterations($array);
        }

        return $iterations === 1 && $unwrapSingle ? $array[0] : $array;
    }
public function generate(int $iterations = 1, bool $unwrapSingle = true)
    {
        list ($this->min, $this->max) = $this->prepareMinMax();

        $this->iterations = $iterations = max(1, $iterations);

        $array = $this->performGenerate($iterations);

        if ($this->unique) {
            $array = $this->fillNonUniqueIterations($array);
        }

        return $iterations === 1 && $unwrapSingle ? $array[0] : $array;
    }
public function generate ( int $ iterations = 1 , bool $ unwrapSingle = true ) { list ( $ this -> min , $ this -> max ) = $ this -> prepareMinMax ( ) ; $ this -> iterations = $ iterations = max ( 1 , $ iterations ) ; $ array = $ this -> performGenerate ( $ iterations ) ; if ( $ this -> unique ) { $ array = $ this -> fillNonUniqueIterations ( $ array ) ; } return $ iterations === 1 && $ unwrapSingle ? $ array [ 0 ] : $ array ; }
Generates a new random Rut object

@param int $iterations
@param bool $unwrapSingle
@return array|Rut
@throws Exceptions\InvalidRutException
Generates a new random Rut object