protected function fillNonUniqueIterations(array &$array)
    {
        $array = array_unique($array, SORT_REGULAR);

        while ($this->iterations > ($total = count($array))) {

            array_push($array, ...$this->performGenerate($this->iterations - $total));

            $array = array_unique($array, SORT_REGULAR);

        }

        return array_values($array);
    }
protected function fillNonUniqueIterations(array &$array)
    {
        $array = array_unique($array, SORT_REGULAR);

        while ($this->iterations > ($total = count($array))) {

            array_push($array, ...$this->performGenerate($this->iterations - $total));

            $array = array_unique($array, SORT_REGULAR);

        }

        return array_values($array);
    }
protected function fillNonUniqueIterations ( array & $ array ) { $ array = array_unique ( $ array , SORT_REGULAR ) ; while ( $ this -> iterations > ( $ total = count ( $ array ) ) ) { array_push ( $ array , ... $ this -> performGenerate ( $ this -> iterations - $ total ) ) ; $ array = array_unique ( $ array , SORT_REGULAR ) ; } return array_values ( $ array ) ; }
Remove non unique values and replaces them with new ones

We use this method because it's less resource-heavy to make 100 RUTs,
filter the ones repeated, count how many are left to reach the quota,
generate the remaining, and repeat until there is nothing to generate,
instead of checking each one if it's repeated on the resulting array.

@param array $array
@return array
@throws Exceptions\InvalidRutException
Remove non unique values and replaces them with new ones