original_string: public static function can_create_data_deletion_request_for_self(int $userid = null): bool {
          global $USER;
          $userid = $userid ?: $USER->id;
          return has_capability('tool/dataprivacy:requestdelete', \context_user::instance($userid), $userid);
      }
code: public static function can_create_data_deletion_request_for_self(int $userid = null): bool {
          global $USER;
          $userid = $userid ?: $USER->id;
          return has_capability('tool/dataprivacy:requestdelete', \context_user::instance($userid), $userid);
      }
code_tokens: public static function can_create_data_deletion_request_for_self ( int $ userid = null ) : bool { global $ USER ; $ userid = $ userid ? : $ USER -> id ; return has_capability ( 'tool/dataprivacy:requestdelete' , \ context_user :: instance ( $ userid ) , $ userid ) ; }
docstring: Check if user has permisson to create data deletion request for themselves.
  
  @param int|null $userid ID of the user.
  @return bool
  @throws coding_exception
docstring_tokens: Check if user has permisson to create data deletion request for themselves .