diff --git a/src/Exceptions/TooManyRequestsException.php b/src/Exceptions/TooManyRequestsException.php index 6403a1d..7cf7bfd 100644 --- a/src/Exceptions/TooManyRequestsException.php +++ b/src/Exceptions/TooManyRequestsException.php @@ -12,16 +12,17 @@ class TooManyRequestsException extends Exception public $method; - public $secondsUntilAvailable; - public $minutesUntilAvailable; + public $secondsUntilAvailable; + public function __construct($component, $method, $ip, $secondsUntilAvailable) { $this->component = $component; $this->ip = $ip; $this->method = $method; $this->secondsUntilAvailable = $secondsUntilAvailable; + $this->minutesUntilAvailable = ceil($this->secondsUntilAvailable / 60); parent::__construct(sprintf( @@ -30,7 +31,6 @@ public function __construct($component, $method, $ip, $secondsUntilAvailable) $this->method, $this->component, $this->secondsUntilAvailable, - $this->minutesUntilAvailable )); } }