baseAmount + $random->nextRange(0, $this->randomAmount + 1); } /** * Returns the base amount * @return int */ public function getBaseAmount(): int { return $this->baseAmount; } /** * Sets the base addition amount * @param $amount int */ public function setBaseAmount(int $amount) { $this->baseAmount = $amount; } /** * Returns the random additional amount * @return int */ public function getRandomAmount(): int { return $this->randomAmount; } /** * Sets the random addition amount * @param $amount int */ public function setRandomAmount(int $amount) { $this->randomAmount = $amount; } }