<commit_before><?php
/**
 * repository_webdav class
 *
 * @author <NAME>
 * @version $Id$
 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
 */

require_once($CFG->libdir.'/webdavlib.php');

class repository_webdav extends repository {
    public function __construct($repositoryid, $context = SITEID, $options = array()) {
        parent::__construct($repositoryid, $context, $options);
        $this->wd = new webdav_client();
        $this->wd->set_server($this->webdav_server);
        if (empty($this->webdav_port)) {
            $this->wd->set_port(80);
        } else {
            $this->wd->set_port($this->webdav_port);
        }
        if(!empty($this->webdav_user)){
            $this->wd->set_user($this->webdav_user);<commit_msg>"MDL-17475, if webdav_server is empty, return null"<commit_after><?php
/**
 * repository_webdav class
 *
 * @author <NAME>
 * @version $Id$
 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
 */

require_once($CFG->libdir.'/webdavlib.php');

class repository_webdav extends repository {
    public function __construct($repositoryid, $context = SITEID, $options = array()) {
        parent::__construct($repositoryid, $context, $options);
        $this->wd = new webdav_client();
        if (empty($this->webdav_server)) {
            return;
        }
        $this->wd->set_server($this->webdav_server);
        if (empty($this->webdav_port)) {
            $this->wd->set_port(80);
        } else {
            $this->wd->set_port($this->webdav_port);
        }
        if(!empty($this->webdav_user)){
            $this->wd->set_user($this->webdav_user);
{'fraction_non_alphanumeric': 0.1706422018348624, 'fraction_numerical': 0.005504587155963303, 'mean_word_length': 2.9902439024390244, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6068361', 'n_tokens_mistral': 545, 'n_tokens_neox': 519, 'n_words': 84}