original_string: protected static function get_custom_types() {
          global $CFG;
          if (!empty($CFG->customfiletypes)) {
              if (is_array($CFG->customfiletypes)) {
                  // You can define this as an array in config.php...
                  return $CFG->customfiletypes;
              } else {
                  // Or as a JSON string in the config table.
                  return json_decode($CFG->customfiletypes);
              }
          } else {
              return array();
          }
      }
code: protected static function get_custom_types() {
          global $CFG;
          if (!empty($CFG->customfiletypes)) {
              if (is_array($CFG->customfiletypes)) {
                  // You can define this as an array in config.php...
                  return $CFG->customfiletypes;
              } else {
                  // Or as a JSON string in the config table.
                  return json_decode($CFG->customfiletypes);
              }
          } else {
              return array();
          }
      }
code_tokens: protected static function get_custom_types ( ) { global $ CFG ; if ( ! empty ( $ CFG -> customfiletypes ) ) { if ( is_array ( $ CFG -> customfiletypes ) ) { // You can define this as an array in config.php... return $ CFG -> customfiletypes ; } else { // Or as a JSON string in the config table. return json_decode ( $ CFG -> customfiletypes ) ; } } else { return array ( ) ; } }
docstring: Gets custom types from config variable, after decoding the JSON if required.
  
  @return array Array of custom types (empty array if none)
docstring_tokens: Gets custom types from config variable after decoding the JSON if required .