public function getRemainingSuspensionTime()
	{
		if(!$this->isSuspended())
			return 0;

		$lastAttempt = clone $this->last_attempt_at;

		$suspensionTime  = static::$suspensionTime;
		$clearAttemptsAt = $lastAttempt->modify("+{$suspensionTime} minutes");
		$now             = new Datetime;

		$timeLeft = $clearAttemptsAt->diff($now);

		$minutesLeft = ($timeLeft->s != 0 ?
						($timeLeft->days * 24 * 60) + ($timeLeft->h * 60) + ($timeLeft->i) + 1 :
						($timeLeft->days * 24 * 60) + ($timeLeft->h * 60) + ($timeLeft->i));

		return $minutesLeft;
	}
public function getRemainingSuspensionTime()
	{
		if(!$this->isSuspended())
			return 0;

		$lastAttempt = clone $this->last_attempt_at;

		$suspensionTime  = static::$suspensionTime;
		$clearAttemptsAt = $lastAttempt->modify("+{$suspensionTime} minutes");
		$now             = new Datetime;

		$timeLeft = $clearAttemptsAt->diff($now);

		$minutesLeft = ($timeLeft->s != 0 ?
						($timeLeft->days * 24 * 60) + ($timeLeft->h * 60) + ($timeLeft->i) + 1 :
						($timeLeft->days * 24 * 60) + ($timeLeft->h * 60) + ($timeLeft->i));

		return $minutesLeft;
	}
public function getRemainingSuspensionTime ( ) { if ( ! $ this -> isSuspended ( ) ) return 0 ; $ lastAttempt = clone $ this -> last_attempt_at ; $ suspensionTime = static :: $ suspensionTime ; $ clearAttemptsAt = $ lastAttempt -> modify ( "+{$suspensionTime} minutes" ) ; $ now = new Datetime ; $ timeLeft = $ clearAttemptsAt -> diff ( $ now ) ; $ minutesLeft = ( $ timeLeft -> s != 0 ? ( $ timeLeft -> days * 24 * 60 ) + ( $ timeLeft -> h * 60 ) + ( $ timeLeft -> i ) + 1 : ( $ timeLeft -> days * 24 * 60 ) + ( $ timeLeft -> h * 60 ) + ( $ timeLeft -> i ) ) ; return $ minutesLeft ; }
Get the remaining time on a suspension in minutes rounded up. Returns
0 if user is not suspended.

@return int
Get the remaining time on a suspension in minutes rounded up . Returns 0 if user is not suspended .