<commit_before><?php
namespace WodorNet\MotoTripBundle\Mailing;
use WodorNet\MotoTripBundle\Event\TripSignupEvent;
use WodorNet\MotoTripBundle\MotoTripEvents;
use WodorNet\MotoTripBundle\Mailing\Sender;

/**
 * i have noticed that it's better (for performace)  to pass whole service container to event subscriber, than an defined
 * service with dependecies like mailer or translator, baecause this way we loose lazy load
 * < Stof> wodor: no, subscribers are registered lazily too
 * < Stof> well, in 2.1
 */
class TripSignupsSubscriber implements \Doctrine\Common\EventSubscriber
{
    /**
     * @var \WodorNet\MotoTripBundle\Mailing\Sender
     */
    public $sender;

    /**
     * @param \WodorNet\MotoTripBundle\Mailing\Sender $sender
     */
    public function __construct(\Symfony\Component\DependencyInjection\Container $container)
    {
        //$container->get('wodor_net_moto_trip.mailing.sender');
        // $this->sender = $sender;
    }

    public function getSubscribedEvents()
    {
        return array('postPersist', 'postUpdate');
    }

    public function postPersist(\Doctrine\ORM\Event\LifecycleEventArgs $args)
    {
        /**
         * @var $tripSignup TripSignup
         */
        $tripSignup = $args->getEntity();

        if ($tripSignup instanceof \WodorNet\MotoTripBundle\Entity\TripSignup) {

        }

    }

    public function  postUpdate(\Doctrine\ORM\Event\PreUpdateEventArgs $args)
    {
        echo "XXXXXXDXXXXXXXX";
    }

//    /**
//     * @static
//     * @return array
//     */
//    static public function getSubscribedEvents()
//    {
//        return array(
//            MotoTripEvents::onTripSignupApprove => 'onTripSignupApprove',<commit_msg>fast fix<commit_after><?php
namespace WodorNet\MotoTripBundle\Mailing;
use WodorNet\MotoTripBundle\Event\TripSignupEvent;
use WodorNet\MotoTripBundle\MotoTripEvents;
use WodorNet\MotoTripBundle\Mailing\Sender;

/**
 * i have noticed that it's better (for performace)  to pass whole service container to event subscriber, than an defined
 * service with dependecies like mailer or translator, baecause this way we loose lazy load
 * < Stof> wodor: no, subscribers are registered lazily too
 * < Stof> well, in 2.1
 */
class TripSignupsSubscriber implements \Doctrine\Common\EventSubscriber
{
    /**
     * @var \WodorNet\MotoTripBundle\Mailing\Sender
     */
    public $sender;

    /**
     * @param \WodorNet\MotoTripBundle\Mailing\Sender $sender
     */
    public function __construct(\Symfony\Component\DependencyInjection\Container $container)
    {
        //$container->get('wodor_net_moto_trip.mailing.sender');
        // $this->sender = $sender;
    }

    public function getSubscribedEvents()
    {
        return array('postPersist', 'postUpdate');
    }

    public function postPersist(\Doctrine\ORM\Event\LifecycleEventArgs $args)
    {
        /**
         * @var $tripSignup TripSignup
         */
        $tripSignup = $args->getEntity();

        if ($tripSignup instanceof \WodorNet\MotoTripBundle\Entity\TripSignup) {

        }

    }

    public function  postUpdate(\Doctrine\ORM\Event\LifecycleEventArgs $args)
    {
        echo "XXXXXXDXXXXXXXX";
    }

//    /**
//     * @static
//     * @return array
//     */
//    static public function getSubscribedEvents()
//    {
//        return array(
//            MotoTripEvents::onTripSignupApprove => 'onTripSignupApprove',
{'fraction_non_alphanumeric': 0.11322968612496333, 'fraction_numerical': 0.0011733646230566149, 'mean_word_length': 2.8487584650112865, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '2559424', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1049, 'n_words': 216}