private function generateNatural() { self::generateDefaults(); if ($this->min < 0) { throw new UnallowedLessThanZeroException(); } return Rando::integer(['min' => $this->min, 'max' => $this->max]); }
private function doRandomization() { $length = !empty($this->length) ? $this->length : Rando::integer(['min' => $this->minLength, 'max' => $this->maxLength]); $string = ''; while ($length > 0) { if (empty($this->pool)) { $string .= Rando::character(); } else { $string .= Rando::character(['pool' => $this->pool]); } $length--; } return $string; }