<commit_before><?php

namespace CL\Swiftmailer;

use Swift_Events_SendListener;
use Closure;

/**
 * @author    <NAME> <<EMAIL>>
 * @copyright 2015, Clippings Ltd.
 * @license   http://spdx.org/licenses/BSD-3-Clause
 */
class ModifyPlugin implements Swift_Events_SendListener
{
    private $modifier;

    function __construct(Closure $modifier)
    {
        $this->modifier = $modifier;
    }

    /**
     * Apply whitelist and blacklist to "to", "cc" and "bcc"
     *
     * @param Swift_Events_SendEvent $evt
     */
    public function beforeSendPerformed(\Swift_Events_SendEvent $evt)
    {
        $message = $evt->getMessage();

        $modifier = $this->modifier;

        $modifier($message);
    }

    /**
     * Do nothing
     *<commit_msg>Fix PHPDoc description for beforeSendPerformed() method<commit_after><?php

namespace CL\Swiftmailer;

use Swift_Events_SendListener;
use Closure;

/**
 * @author    <NAME> <<EMAIL>>
 * @copyright 2015, Clippings Ltd.
 * @license   http://spdx.org/licenses/BSD-3-Clause
 */
class ModifyPlugin implements Swift_Events_SendListener
{
    private $modifier;

    function __construct(Closure $modifier)
    {
        $this->modifier = $modifier;
    }

    /**
     * Apply the modifier to the Swift_Message
     *
     * @param Swift_Events_SendEvent $evt
     */
    public function beforeSendPerformed(\Swift_Events_SendEvent $evt)
    {
        $message = $evt->getMessage();

        $modifier = $this->modifier;

        $modifier($message);
    }

    /**
     * Do nothing
     *
{'fraction_non_alphanumeric': 0.12272727272727273, 'fraction_numerical': 0.006493506493506494, 'mean_word_length': 2.7677261613691932, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '3058685', 'n_tokens_mistral': 517, 'n_tokens_neox': 489, 'n_words': 102}