<commit_before><?php

    include_once(QFRAMEWORK_CLASS_PATH . "qframework/class/object/qobject.class.php");

    define(MAX_LINE_LENGTH, 998);
    define(DEFAULT_EMAIL_MESSAGE_MIME_TYPE, "text/plain");

    /**
     * Represents an email message.
     */
    class qEmailMessage extends qObject
    {
        var $_toAddrs;
        var $_ccAddrs;
        var $_bccAddrs;
        var $_subject;
        var $_body;
        var $_mimeType;
        var $_attachments;

        /**
         * Constructor
         */
        function qEmailMessage()
        {
            $this->qObject();

            $this->_toAddrs     = array();
            $this->_ccAddrs     = array();
            $this->_bccAddrs    = array();
            $this->_attachments = array();
            $this->_mimeType    = DEFAULT_EMAIL_MESSAGE_MIME_TYPE;
        }

        function addAttachment($attachment)
        {
            array_push($this->_attachments, $attachment);
        }

        /**
         * Adds a destination
         *
         * @param to Destination address.
         */
        function addTo($to)
        {
            array_push($this->_toAddrs, rtrim($to));
        }

        /**
         * Adds a Cc:
         *
         * @param cc The address where we want to Cc this message
         */
        function addCc($cc)
        {
            array_push($this->_ccAddrs, rtrim($cc));
        }

        /**
         * Adds a Bcc address
         *
         * @param bcc The adddress where we want to Bcc
         */
        function addBcc($bcc)
        {
            array_push($this->_bccAddrs, rtrim($bcc));
        }

        /**<commit_msg>An improvement to qEmailMessage class<commit_after><?php

    include_once(QFRAMEWORK_CLASS_PATH . "qframework/class/object/qobject.class.php");

    define(MAX_LINE_LENGTH, 998);
    define(DEFAULT_EMAIL_MESSAGE_MIME_TYPE, "text/plain");

    /**
     * Represents an email message.
     */
    class qEmailMessage extends qObject
    {
        var $_toAddrs;
        var $_ccAddrs;
        var $_bccAddrs;
        var $_subject;
        var $_body;
        var $_mimeType;
        var $_attachments;

        /**
         * Constructor
         */
        function qEmailMessage()
        {
            $this->qObject();

            $this->_toAddrs     = array();
            $this->_ccAddrs     = array();
            $this->_bccAddrs    = array();
            $this->_attachments = array();
            $this->_mimeType    = DEFAULT_EMAIL_MESSAGE_MIME_TYPE;
        }

        function addAttachment($attachment)
        {
            array_push($this->_attachments, $attachment);
        }

        /**
         * Adds a destination
         *
         * @param to Destination address.
         */
        function addTo($to)
        {
            $addreces = explode(",", $to);

            foreach ($addreces as $address)
            {
                array_push($this->_toAddrs, trim($address));
            }
        }

        /**
         * Adds a Cc:
         *
         * @param cc The address where we want to Cc this message
         */
        function addCc($cc)
        {
            $addreces = explode(",", $cc);

            foreach ($addreces as $address)
            {
                array_push($this->_ccAddrs, trim($address));
            }
        }

        /**
         * Adds a Bcc address
         *
         * @param bcc The adddress where we want to Bcc
         */
        function addBcc($bcc)
        {
            $addreces = explode(",", $bcc);

            foreach ($addreces as $address)
            {
                array_push($this->_bccAddrs, trim($address));
            }
        }

        /**
{'fraction_non_alphanumeric': 0.11502984264785676, 'fraction_numerical': 0.0016277807921866521, 'mean_word_length': 1.3695372750642674, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '3848577', 'n_tokens_mistral': 1076, 'n_tokens_neox': 1048, 'n_words': 211}