original_string: protected static function addGuest($ip, $url)
      {
          $activity = static::find()->where(['ip' => $ip, 'user_id' => null])->limit(1)->one();
          if (empty($activity)) {
              $activity = new static;
              $activity->ip = $ip;
          }
          $activity->url = $url;
          return $activity->save();
      }
code: protected static function addGuest($ip, $url)
      {
          $activity = static::find()->where(['ip' => $ip, 'user_id' => null])->limit(1)->one();
          if (empty($activity)) {
              $activity = new static;
              $activity->ip = $ip;
          }
          $activity->url = $url;
          return $activity->save();
      }
code_tokens: protected static function addGuest ( $ ip , $ url ) { $ activity = static :: find ( ) -> where ( [ 'ip' => $ ip , 'user_id' => null ] ) -> limit ( 1 ) -> one ( ) ; if ( empty ( $ activity ) ) { $ activity = new static ; $ activity -> ip = $ ip ; } $ activity -> url = $ url ; return $ activity -> save ( ) ; }
docstring: Adds guest activity.
  @param string $ip
  @param string $url
  @return bool
  @since 0.6
docstring_tokens: Adds guest activity .