code: 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;
      }
docs: @param $secret
  @param $code
  
  @return bool