original_string: protected static function delete_data(int $userid) {
          global $DB;
  
          foreach (static::get_records($userid) as $record) {
              $DB->delete_records('message_airnotifier_devices', ['id' => $record->id]);
          }
      }
code: protected static function delete_data(int $userid) {
          global $DB;
  
          foreach (static::get_records($userid) as $record) {
              $DB->delete_records('message_airnotifier_devices', ['id' => $record->id]);
          }
      }
code_tokens: protected static function delete_data ( int $ userid ) { global $ DB ; foreach ( static :: get_records ( $ userid ) as $ record ) { $ DB -> delete_records ( 'message_airnotifier_devices' , [ 'id' => $ record -> id ] ) ; } }
docstring: Delete data related to a userid.
  
  @param int $userid The user ID
docstring_tokens: Delete data related to a userid .