original_string: protected static function format_lesson_messages($lesson) {
          $messages = array();
          foreach ($lesson->messages as $message) {
              $messages[] = array(
                  'message' => $message[0],
                  'type' => $message[1],
              );
          }
          return $messages;
      }
code: protected static function format_lesson_messages($lesson) {
          $messages = array();
          foreach ($lesson->messages as $message) {
              $messages[] = array(
                  'message' => $message[0],
                  'type' => $message[1],
              );
          }
          return $messages;
      }
code_tokens: protected static function format_lesson_messages ( $ lesson ) { $ messages = array ( ) ; foreach ( $ lesson -> messages as $ message ) { $ messages [ ] = array ( 'message' => $ message [ 0 ] , 'type' => $ message [ 1 ] , ) ; } return $ messages ; }
docstring: Return lesson messages formatted according the external_messages structure
  
  @param  lesson $lesson lesson instance
  @return array          messages formatted
  @since Moodle 3.3
docstring_tokens: Return lesson messages formatted according the external_messages structure