<commit_before><?php

/*
 * This file is part of the Sylius package.
 *
 * (c) <NAME>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sylius\Component\Payment\Model;

use Sylius\Component\Resource\Model\ResourceInterface;
use Sylius\Component\Resource\Model\TimestampableInterface;

/**
 * @author <NAME> <<EMAIL>>
 */
interface PaymentInterface extends TimestampableInterface, ResourceInterface
{
    const STATE_CART = 'cart';
    const STATE_NEW = 'new';
    const STATE_PROCESSING = 'processing';
    const STATE_COMPLETED = 'completed';
    const STATE_FAILED = 'failed';
    const STATE_CANCELLED = 'cancelled';
    const STATE_VOID = 'void';
    const STATE_REFUNDED = 'refunded';
    const STATE_AUTHORIZED = 'authorized';
    const STATE_UNKNOWN = 'unknown';
    const STATE_PAYEDOUT = 'payedout';

    /**
     * @return PaymentMethodInterface
     */
    public function getMethod();

    /**
     * @param null|PaymentMethodInterface $method
     */
    public function setMethod(PaymentMethodInterface $method = null);

    /**
     * @return string
     */
    public function getState();

    /**
     * @param string $state
     */
    public function setState($state);

    /**
     * @return string
     */
    public function getCurrencyCode();

    /**
     * @param string
     */
    public function setCurrencyCode($currencyCode);

    /**
     * @return int
     */
    public function getAmount();

    /**
     * @param int $amount
     */
    public function setAmount($amount);

    /**
     * @return array
     */
    public function getDetails();

    /**
     * @param array|\Traversable $details
     */
    public function setDetails($details);
}
<commit_msg>[Payment] Clean up payment state machine<commit_after><?php

/*
 * This file is part of the Sylius package.
 *
 * (c) <NAME>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sylius\Component\Payment\Model;

use Sylius\Component\Resource\Model\ResourceInterface;
use Sylius\Component\Resource\Model\TimestampableInterface;

/**
 * @author <NAME> <<EMAIL>>
 */
interface PaymentInterface extends TimestampableInterface, ResourceInterface
{
    const STATE_CART = 'cart';
    const STATE_NEW = 'new';
    const STATE_PROCESSING = 'processing';
    const STATE_COMPLETED = 'completed';
    const STATE_FAILED = 'failed';
    const STATE_CANCELLED = 'cancelled';
    const STATE_REFUNDED = 'refunded';
    const STATE_UNKNOWN = 'unknown';

    /**
     * @return PaymentMethodInterface
     */
    public function getMethod();

    /**
     * @param null|PaymentMethodInterface $method
     */
    public function setMethod(PaymentMethodInterface $method = null);

    /**
     * @return string
     */
    public function getState();

    /**
     * @param string $state
     */
    public function setState($state);

    /**
     * @return string
     */
    public function getCurrencyCode();

    /**
     * @param string
     */
    public function setCurrencyCode($currencyCode);

    /**
     * @return int
     */
    public function getAmount();

    /**
     * @param int $amount
     */
    public function setAmount($amount);

    /**
     * @return array
     */
    public function getDetails();

    /**
     * @param array|\Traversable $details
     */
    public function setDetails($details);
}

{'fraction_non_alphanumeric': 0.11677160847166572, 'fraction_numerical': 0.0, 'mean_word_length': 2.7661637931034484, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '2729200', 'n_tokens_mistral': 1014, 'n_tokens_neox': 985, 'n_words': 262}