original_string: public function add_user_context(int $userid) : contextlist {
          $sql = "SELECT DISTINCT ctx.id
                    FROM {context} ctx
                   WHERE ctx.contextlevel = :contextlevel
                     AND ctx.instanceid = :instanceid";
          return $this->add_from_sql($sql, ['contextlevel' => CONTEXT_USER, 'instanceid' => $userid]);
      }
code: public function add_user_context(int $userid) : contextlist {
          $sql = "SELECT DISTINCT ctx.id
                    FROM {context} ctx
                   WHERE ctx.contextlevel = :contextlevel
                     AND ctx.instanceid = :instanceid";
          return $this->add_from_sql($sql, ['contextlevel' => CONTEXT_USER, 'instanceid' => $userid]);
      }
code_tokens: public function add_user_context ( int $ userid ) : contextlist { $ sql = "SELECT DISTINCT ctx.id
                    FROM {context} ctx
                   WHERE ctx.contextlevel = :contextlevel
                     AND ctx.instanceid = :instanceid" ; return $ this -> add_from_sql ( $ sql , [ 'contextlevel' => CONTEXT_USER , 'instanceid' => $ userid ] ) ; }
docstring: Adds the user context for a given user.
  
  @param int $userid
  @return $this
docstring_tokens: Adds the user context for a given user .