lib/OTPHelper.php
protected function setCounter($type, $counter)
	{
		if ($type === 'hotp')
		{
			if ($counter !== 0 && empty($counter))
			{
				throw new \InvalidArgumentException("Counter can't be empty if HOTP is being used");
			}

			$this->parameters .= "&counter=$counter";
		}
	}
protected function setCounter($type, $counter)
	{
		if ($type === 'hotp')
		{
			if ($counter !== 0 && empty($counter))
			{
				throw new \InvalidArgumentException("Counter can't be empty if HOTP is being used");
			}

			$this->parameters .= "&counter=$counter";
		}
	}
protected function setCounter ( $ type , $ counter ) { if ( $ type === 'hotp' ) { if ( $ counter !== 0 && empty ( $ counter ) ) { throw new \ InvalidArgumentException ( "Counter can't be empty if HOTP is being used" ) ; } $ this -> parameters .= "&counter=$counter" ; } }
Set counter value if hotp is being used

@param string $type Type of OTP auth, either HOTP or TOTP
@param int $counter Counter value

@throws \InvalidArgumentException If counter is empty while using HOTP
Set counter value if hotp is being used