original_string: protected function get_whitelisted_ports() {
          global $CFG;
          if (!isset($CFG->curlsecurityallowedport)) {
              return [];
          }
          return array_filter(array_map('trim', explode("\n", $CFG->curlsecurityallowedport)), function($entry) {
              return !empty($entry);
          });
      }
code: protected function get_whitelisted_ports() {
          global $CFG;
          if (!isset($CFG->curlsecurityallowedport)) {
              return [];
          }
          return array_filter(array_map('trim', explode("\n", $CFG->curlsecurityallowedport)), function($entry) {
              return !empty($entry);
          });
      }
code_tokens: protected function get_whitelisted_ports ( ) { global $ CFG ; if ( ! isset ( $ CFG -> curlsecurityallowedport ) ) { return [ ] ; } return array_filter ( array_map ( 'trim' , explode ( "\n" , $ CFG -> curlsecurityallowedport ) ) , function ( $ entry ) { return ! empty ( $ entry ) ; } ) ; }
docstring: Helper that returns the whitelisted ports, as defined in the 'curlsecurityallowedport' setting.
  
  @return array the array of whitelisted ports.
docstring_tokens: Helper that returns the whitelisted ports as defined in the curlsecurityallowedport setting .