<commit_before><?php
namespace Jifno;

require_once 'Jifno/Storage/Db.php';

class Message
{
    protected $_sender = array('address' => null, 'name' => null);

    protected $_recipient = array('address' => null, 'name' => null);
    
    protected $_subject;
    
    protected $_content;
    
    protected $_attachments = array();
    
    protected $_profile;
    
    /**
    * Default options
    */
    public static $defaults = array(
        'name'    => null, 
        'from'    => null, 
        'profile' => null
    );
    
    public function __construct($profile = null)
    {
        $this->_profile = $profile;
    }

    /**
     * @return \Jifno\Message
     */
    public function subject($value)
    {
        $this->_subject = $value;
        return $this;
    }
    
    /**
     * @return \Jifno\Message
     */
    public function to($address, $name = null)
    {
        if (is_array($address)) {
            $this->_recipient = $address;
        } else {
            $this->_recipient = array(
                'address' => $address,
                'name'    => $name
            );
        }
        return $this;
    }

    /**
     * @return \Jifno\Message
     */
    public function attach($name, $type, $content)
    {
        array_push($this->_attachments, array(
            'name'      => $name,
            'type'      => $type,
            'content'   => $content
        ));
        return $this;
    }

    /**
     * @return \Jifno\Message
     */
    public function content($value)
    {
        if (is_object($value)) {
            $this->_content = $value->getContent();
        } else {
            $this->_content = $value;
        }
        return $this;
    }
    
    /**
     * @param string $address
     * @param string $name
     * @return \Jifno\Message
     */
    public function from($address, $name = null)
    {
        if (is_array($address)) {
            $this->_from = $address;
        } else {
            $this->_from = array(
                'address' => $address,
                'name'    => $name<commit_msg>Fixed from address not being set correctly<commit_after><?php
namespace Jifno;

require_once 'Jifno/Storage/Db.php';

class Message
{
    protected $_sender = array('address' => null, 'name' => null);

    protected $_recipient = array('address' => null, 'name' => null);
    
    protected $_subject;
    
    protected $_content;
    
    protected $_attachments = array();
    
    protected $_profile;
    
    /**
    * Default options
    */
    public static $defaults = array(
        'name'    => null, 
        'from'    => null, 
        'profile' => null
    );
    
    public function __construct($profile = null)
    {
        $this->_profile = $profile;
    }

    /**
     * @return \Jifno\Message
     */
    public function subject($value)
    {
        $this->_subject = $value;
        return $this;
    }
    
    /**
     * @return \Jifno\Message
     */
    public function to($address, $name = null)
    {
        if (is_array($address)) {
            $this->_recipient = $address;
        } else {
            $this->_recipient = array(
                'address' => $address,
                'name'    => $name
            );
        }
        return $this;
    }

    /**
     * @return \Jifno\Message
     */
    public function attach($name, $type, $content)
    {
        array_push($this->_attachments, array(
            'name'      => $name,
            'type'      => $type,
            'content'   => $content
        ));
        return $this;
    }

    /**
     * @return \Jifno\Message
     */
    public function content($value)
    {
        if (is_object($value)) {
            $this->_content = $value->getContent();
        } else {
            $this->_content = $value;
        }
        return $this;
    }
    
    /**
     * @param string $address
     * @param string $name
     * @return \Jifno\Message
     */
    public function from($address, $name = null)
    {
        if (is_array($address)) {
            $this->_sender = $address;
        } else {
            $this->_sender = array(
                'address' => $address,
                'name'    => $name
{'fraction_non_alphanumeric': 0.14398092967818832, 'fraction_numerical': 0.0, 'mean_word_length': 1.4902077151335311, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 51, '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': '1111558', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1234, 'n_words': 265}