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);
        });
    }
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);
        });
    }
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 ) ; } ) ; }
Helper that returns the whitelisted ports, as defined in the 'curlsecurityallowedport' setting.

@return array the array of whitelisted ports.
Helper that returns the whitelisted ports as defined in the curlsecurityallowedport setting .