<commit_before><?php
/**
 * Created by <NAME> - 16/06/17 09:05 PM.
 */

namespace Enea\Cashier\Contracts;

use Illuminate\Contracts\Support\Arrayable;

/**
 * Interface CalculatorContract.
 */
interface CalculatorContract extends Arrayable
{
    /**
     * Returns the requested quantity for the item.
     *
     * @return int
     */
    public function getQuantity();

    /**
     * Returns the assigned tax.
     *
     * @return int
     */
    public function getImpostPercentage();

    /**
     * Returns the assigned discount item.
     *
     * @return int
     */
    public function getDiscountPercentage();

    /**
     * Returns the assigned plan discount item.
     *
     * @return int
     */
    public function getPlanDiscountPercentage();

    /**
     * Returns the assigned discount item.
     *
     * @param int $percentage
     *
     * @return CalculatorContract
     */
    public function setDiscountPercentage($percentage);

    /**
     * Set a tax rate for the item.
     *
     * @param int $percentage
     *
     * @return CalculatorContract
     */
    public function setImpostPercentage($percentage);

    /**
     * Set a plan discount for the item.
     *
     * @param int $percentage
     *
     * @return CalculatorContract
     */
    public function setPlanPercentage($percentage);

    /**
     * Returns the unit price.
     *
     * @return float
     */
    public function getBasePrice();

    /**
     * Multiply the total by the amount.
     *
     * @return float
     */
    public function getSubtotal();

    /**
     * Returns discount item.
     *
     * @return float
     */
    public function getDiscount();

    /**
     * Returns plan discount.
     *
     * @return float
     */
    public function getPlanDiscount();

    /**
     * Total sum of discounts.
     *
     * @return float
     */
    public function getTotalDiscounts();

    /**
     * Get general sale sax.
     *
     * @return float
     */
    public function getImpost();

    /**
     * Returns total definitive.
     *
     * @return float
     */
    public function getDefinitiveTotal();
}<commit_msg>Update CalculatorContract<commit_after><?php
/**
 * Created by <NAME> - 16/06/17 09:05 PM.
 */

namespace Enea\Cashier\Contracts;

use Enea\Cashier\Calculations\Modifier;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Support\Collection;

/**
 * Interface CalculatorContract.
 */
interface CalculatorContract extends Arrayable, Jsonable
{
    /**
     * Returns all taxes.
     *
     * @return Collection
     */
    public function getTaxes();

    /**
     * Returns all discounts.
     *
     * @return Collection
     */
    public function getDiscounts();

    /**
     * Returns the requested quantity for the item.
     *
     * @return int
     */
    public function getQuantity();

    /**
     * Returns the unit price with configured decimal format.
     *
     * @return float
     */
    public function getBasePrice();

    /**
     * Returns the subtotal with configured decimal format.
     *
     * @return float
     */
    public function getSubtotal();

    /**
     * Returns the discount total with configured decimal format.
     *
     * @return float
     */
    public function getTotalDiscounts();

    /**
     * Returns the tax total with configured decimal format.
     *
     * @return float
     */
    public function getTotalTaxes();

    /**
     * Returns the definitive total with configured decimal format
     *
     * @return float
     */
    public function getDefinitiveTotal();

    /**
     * Returns a discount located by its code.
     *
     * @param string|int $code
     * @return Modifier|null
     */
    public function getDiscount($code);
}
{'fraction_non_alphanumeric': 0.1051937780121276, 'fraction_numerical': 0.005272871078302136, 'mean_word_length': 2.0279329608938546, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5091360', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1049, 'n_words': 296}