<commit_before><?php

/**
 * SSRS_Object_Abstract
 *
 * @author arron
 */
class SSRS_Object_ExecutionInfo extends SSRS_Object_Abstract {

    /**
     * Copy of self for backwards compatibility
     * 
     * @var SSRS_Object_ExecutionInfo
     */
    public $executionInfo;

    public function __construct(stdClass $info) {
        $this->setData($info->executionInfo);
        $this->executionInfo = $this;
    }

    public function setParameters(stdClass $params) {
        return $this->setReportParameters($params);
    }

    public function setReportParameters(stdClass $params) {
        $parameters = array();
        if (isset($params->ReportParameter)) {
            foreach ($params->ReportParameter AS $reportParam) {
                $parameter = new SSRS_Object_ReportParameter($reportParam->Name, isset($reportParam->Value) ? $reportParam->Value : null);
                $parameter->setData($reportParam);

                $parameters[] = $parameter;
            }
        }

        $this->data['ReportParameters'] = $parameters;
        return $this;
    }

    /**
     * Returns all report parameters in an array
     * 
     * @return array parameters 
     * 
     */
    public function getReportParameters() {
        return $this->data['ReportParameters'];
    }

}<commit_msg>ExecutionInfo reportParameters fix for reports with only one parameter<commit_after><?php

/**
 * SSRS_Object_Abstract
 *
 * @author arron
 */
class SSRS_Object_ExecutionInfo extends SSRS_Object_Abstract {

    /**
     * Copy of self for backwards compatibility
     * 
     * @var SSRS_Object_ExecutionInfo
     */
    public $executionInfo;

    public function __construct(stdClass $info) {
        $this->setData($info->executionInfo);
        $this->executionInfo = $this;
    }

    public function setParameters(stdClass $params) {
        return $this->setReportParameters($params);
    }

    public function setReportParameters(stdClass $params) {
        $parameters = array();
        if (isset($params->ReportParameter)) {
            $reportParameters = is_array($params->ReportParameter) ? $params->ReportParameter : array($params->ReportParameter);
            foreach ($reportParameters AS $reportParam) {
                $parameter = new SSRS_Object_ReportParameter($reportParam->Name, isset($reportParam->Value) ? $reportParam->Value : null);
                $parameter->setData($reportParam);

                $parameters[] = $parameter;
            }
        }

        $this->data['ReportParameters'] = $parameters;
        return $this;
    }

    /**
     * Returns all report parameters in an array
     * 
     * @return array parameters 
     * 
     */
    public function getReportParameters() {
        return $this->data['ReportParameters'];
    }

}
{'fraction_non_alphanumeric': 0.11490125673249552, 'fraction_numerical': 0.0, 'mean_word_length': 2.571794871794872, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4316547', 'n_tokens_mistral': 758, 'n_tokens_neox': 716, 'n_words': 154}