public function verify(string $otp, ?int $counter = null, ?int $window = null): bool
    {
        Assertion::greaterOrEqualThan($counter, 0, 'The counter must be at least 0.');

        if (null === $counter) {
            $counter = $this->getCounter();
        } elseif ($counter < $this->getCounter()) {
            return false;
        }

        return $this->verifyOtpWithWindow($otp, $counter, $window);
    }
public function verify(string $otp, ?int $counter = null, ?int $window = null): bool
    {
        Assertion::greaterOrEqualThan($counter, 0, 'The counter must be at least 0.');

        if (null === $counter) {
            $counter = $this->getCounter();
        } elseif ($counter < $this->getCounter()) {
            return false;
        }

        return $this->verifyOtpWithWindow($otp, $counter, $window);
    }
public function verify ( string $ otp , ? int $ counter = null , ? int $ window = null ) : bool { Assertion :: greaterOrEqualThan ( $ counter , 0 , 'The counter must be at least 0.' ) ; if ( null === $ counter ) { $ counter = $ this -> getCounter ( ) ; } elseif ( $ counter < $ this -> getCounter ( ) ) { return false ; } return $ this -> verifyOtpWithWindow ( $ otp , $ counter , $ window ) ; }
If the counter is not provided, the OTP is verified at the actual counter.

{@inheritdoc}
If the counter is not provided the OTP is verified at the actual counter .