<commit_before><?php

/**
 * This file is part of the Notify package.
 *
 * Copyright (c) <NAME> <<EMAIL>>
 *
 * For full copyright and license information, please refer to the LICENSE file,
 * located at the package root folder.
 */

namespace Notify\Message;

use Notify\Message\Actor\Recipients;
use Notify\Message\Content\ContentProviderInterface;
use Notify\Message\Actor\ActorInterface;
use Notify\Message\Options\OptionsInterface;
use Notify\Message\Options\Options;
use Notify\Message\Options\EmailOptions;

/**
 * @author <NAME> <<EMAIL>>
 */
class EmailMessage extends AbstractMessage implements
    HasSubjectInterface,
    HasSenderInterface,
    HasOptionsInterface
{
    use HasSenderTrait;
    use HasOptionsTrait;

    /**
     * @var string
     */
    protected $subject;

    /**
     * @param Recipients $recipients
     * @param string $subject
     * @param string|ContentProviderInterface $content
     * @param ActorInterface $sender
     * @param $options
     */
    public function __construct(
        Recipients $recipients,
        $subject,
        $content,
        ActorInterface $sender = null,
        $options = null
    ) {
        parent::__construct($recipients, $content);

        $this->subject = $subject;
        $this->sender = $sender;

        if (null !== $options && $options instanceof EmailOptions) {
            $options = new Options([
                'content_type' => $options->getContentType(),
                'encoding' => $options->getEncoding(),
                'headers' => $options->getHeaders(),
                'parameters' => $options->getParameters(),
                'html' => $options->getContentType() == 'text/html',
            ]);
        }

        $this->options = $options;
    }

    public function getSubject()
    {
        return $this->subject;
    }
}
<commit_msg>CS fixes.<commit_after><?php

/**
 * This file is part of the Notify package.
 *
 * Copyright (c) <NAME> <<EMAIL>>
 *
 * For full copyright and license information, please refer to the LICENSE file,
 * located at the package root folder.
 */

namespace Notify\Message;

use Notify\Message\Actor\Recipients;
use Notify\Message\Content\ContentProviderInterface;
use Notify\Message\Actor\ActorInterface;
use Notify\Message\Options\Options;
use Notify\Message\Options\EmailOptions;

/**
 * @author <NAME> <<EMAIL>>
 */
class EmailMessage extends AbstractMessage implements
    HasSubjectInterface,
    HasSenderInterface,
    HasOptionsInterface
{
    use HasSenderTrait;
    use HasOptionsTrait;

    /**
     * @var string
     */
    protected $subject;

    /**
     * @param Recipients $recipients
     * @param string $subject
     * @param string|ContentProviderInterface $content
     * @param ActorInterface $sender
     * @param $options
     */
    public function __construct(
        Recipients $recipients,
        $subject,
        $content,
        ActorInterface $sender = null,
        $options = null
    ) {
        parent::__construct($recipients, $content);

        $this->subject = $subject;
        $this->sender = $sender;

        if (null !== $options && $options instanceof EmailOptions) {
            $options = new Options([
                'content_type' => $options->getContentType(),
                'encoding' => $options->getEncoding(),
                'headers' => $options->getHeaders(),
                'parameters' => $options->getParameters(),
                'html' => $options->getContentType() == 'text/html',
            ]);
        }

        $this->options = $options;
    }

    public function getSubject()
    {
        return $this->subject;
    }
}

{'fraction_non_alphanumeric': 0.1227010705462531, 'fraction_numerical': 0.0, 'mean_word_length': 2.497120921305182, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 43, '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': '333713', 'n_tokens_mistral': 1013, 'n_tokens_neox': 977, 'n_words': 245}