<commit_before><?php

/*
 * This file is part of the Elcodi package.
 *
 * Copyright (c) 2014-2015 Elcodi Networks S.L.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * Feel free to edit as you please, and have fun.
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author Elcodi Team <<EMAIL>>
 */

namespace Elcodi\Component\Payment\Event;

use Symfony\Component\EventDispatcher\Event;

use Elcodi\Component\Cart\Entity\Interfaces\CartInterface;
use Elcodi\Component\Payment\Entity\PaymentMethod;

/**
 * Class PaymentCollectionEvent
 */
class PaymentCollectionEvent extends Event
{
    /**
     * @var CartInterface
     *
     * Cart
     */
    private $cart;

    /**
     * Construct
     *
     * @param CartInterface $cart Cart
     */
    public function __construct(CartInterface $cart = null)
    {
        $this->cart = $cart;
    }

    /**
     * @var PaymentMethod[]
     *
     * Payment methods
     */
    protected $paymentMethods = [];

    /**
     * Get cart
     *
     * @return CartInterface $cart
     */
    public function getCart()
    {
        return $this->cart;
    }

    /**
     * Add payment method
     *
     * @param PaymentMethod $paymentMethod Payment method
     *
     * @return $this Self object
     */
    public function addPaymentMethod(PaymentMethod $paymentMethod)
    {
        $this->paymentMethods[] =  $paymentMethod;

        return $this;
    }

    /**
     * Get payment methods
     *
     * @return PaymentMethod[] Payment methods
     */
    public function getPaymentMethods()
    {
        return $this->paymentMethods;
    }
}
<commit_msg>Issuse #921 All events set final classes<commit_after><?php

/*
 * This file is part of the Elcodi package.
 *
 * Copyright (c) 2014-2015 Elcodi Networks S.L.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * Feel free to edit as you please, and have fun.
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @author Elcodi Team <<EMAIL>>
 */

namespace Elcodi\Component\Payment\Event;

use Symfony\Component\EventDispatcher\Event;

use Elcodi\Component\Cart\Entity\Interfaces\CartInterface;
use Elcodi\Component\Payment\Entity\PaymentMethod;

/**
 * Class PaymentCollectionEvent
 */
final class PaymentCollectionEvent extends Event
{
    /**
     * @var CartInterface
     *
     * Cart
     */
    private $cart;

    /**
     * Construct
     *
     * @param CartInterface $cart Cart
     */
    public function __construct(CartInterface $cart = null)
    {
        $this->cart = $cart;
    }

    /**
     * @var PaymentMethod[]
     *
     * Payment methods
     */
    protected $paymentMethods = [];

    /**
     * Get cart
     *
     * @return CartInterface $cart
     */
    public function getCart()
    {
        return $this->cart;
    }

    /**
     * Add payment method
     *
     * @param PaymentMethod $paymentMethod Payment method
     *
     * @return $this Self object
     */
    public function addPaymentMethod(PaymentMethod $paymentMethod)
    {
        $this->paymentMethods[] =  $paymentMethod;

        return $this;
    }

    /**
     * Get payment methods
     *
     * @return PaymentMethod[] Payment methods
     */
    public function getPaymentMethods()
    {
        return $this->paymentMethods;
    }
}

{'fraction_non_alphanumeric': 0.11182108626198083, 'fraction_numerical': 0.00551844321812373, 'mean_word_length': 2.3179190751445087, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 27, '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': '2113621', 'n_tokens_mistral': 1018, 'n_tokens_neox': 988, 'n_words': 273}