original_string: protected function get_defaultexpiration_text(\core\message\inbound\handler $handler) {
          switch($handler->defaultexpiration) {
              case HOURSECS :
                      return get_string('onehour', 'tool_messageinbound');
              case DAYSECS :
                      return get_string('oneday', 'tool_messageinbound');
              case WEEKSECS :
                      return get_string('oneweek', 'tool_messageinbound');
              case YEARSECS :
                      return get_string('oneyear', 'tool_messageinbound');
              case 0:
                      return get_string('noexpiry', 'tool_messageinbound');
              default:
                      return ''; // Should never happen.
          }
      }
code: protected function get_defaultexpiration_text(\core\message\inbound\handler $handler) {
          switch($handler->defaultexpiration) {
              case HOURSECS :
                      return get_string('onehour', 'tool_messageinbound');
              case DAYSECS :
                      return get_string('oneday', 'tool_messageinbound');
              case WEEKSECS :
                      return get_string('oneweek', 'tool_messageinbound');
              case YEARSECS :
                      return get_string('oneyear', 'tool_messageinbound');
              case 0:
                      return get_string('noexpiry', 'tool_messageinbound');
              default:
                      return ''; // Should never happen.
          }
      }
code_tokens: protected function get_defaultexpiration_text ( \ core \ message \ inbound \ handler $ handler ) { switch ( $ handler -> defaultexpiration ) { case HOURSECS : return get_string ( 'onehour' , 'tool_messageinbound' ) ; case DAYSECS : return get_string ( 'oneday' , 'tool_messageinbound' ) ; case WEEKSECS : return get_string ( 'oneweek' , 'tool_messageinbound' ) ; case YEARSECS : return get_string ( 'oneyear' , 'tool_messageinbound' ) ; case 0 : return get_string ( 'noexpiry' , 'tool_messageinbound' ) ; default : return '' ; // Should never happen. } }
docstring: Return a text string representing the selected default expiration for the handler.
  
  @param \core\message\inbound\handler $handler handler instance.
  
  @return string localised text string.
docstring_tokens: Return a text string representing the selected default expiration for the handler .