src/GoogleAuthenticator.php
public function checkCode($secret, $code)
    {
        $time = floor(time() / 30);
        for ($i = -1; $i <= 1; ++$i) {
            if ($this->codesEqual($this->getCode($secret, $time + $i), $code)) {
                return true;
            }
        }

        return false;
    }
public function checkCode($secret, $code)
    {
        $time = floor(time() / 30);
        for ($i = -1; $i <= 1; ++$i) {
            if ($this->codesEqual($this->getCode($secret, $time + $i), $code)) {
                return true;
            }
        }

        return false;
    }
public function checkCode ( $ secret , $ code ) { $ time = floor ( time ( ) / 30 ) ; for ( $ i = - 1 ; $ i <= 1 ; ++ $ i ) { if ( $ this -> codesEqual ( $ this -> getCode ( $ secret , $ time + $ i ) , $ code ) ) { return true ; } } return false ; }
@param $secret
@param $code

@return bool
@param $secret @param $code