<commit_before><?php
namespace bunq\test\Model\Generated\Endpoint;

use bunq\Model\Generated\Endpoint\Payment;
use bunq\Model\Generated\Endpoint\PaymentBatch;
use bunq\Model\Generated\Object\Amount;
use bunq\Model\Generated\Object\LabelMonetaryAccount;
use bunq\Model\Generated\Object\Pointer;
use bunq\test\BunqSdkTestBase;

/**
 * Tests:
 * PaymentBatch
 * Payment
 */
class PaymentBatchTest extends BunqSdkTestBase
{
    /**
     * Test constants
     */
    const PAYMENT_CURRENCY = 'EUR';
    const PAYMENT_DESCRIPTION = "php sdk Batch test";

    /**
     */
    public function testSendBatchPayment()
    {
        $response = PaymentBatch::create(
            $this->createPaymentArray()
        );

        self::assertTrue(is_integer($response->getValue()));
    }

    /**
     * @return Payment[]
     */
    private function createPaymentArray(): array
    {
        $allPayment = [];

        while (count($allPayment) < 10) {
            $payment = new Payment(
                new Amount(self::PAYMENT_AMOUNT_DEFAULT, self::PAYMENT_CURRENCY),
                $this->getPointerUserBravo(),
                self::PAYMENT_DESCRIPTION
            );

            $allPayment[] = $payment;
        }

        return $allPayment;
    }
}<commit_msg>Removed magic values. (bunq/sdk_php#118)<commit_after><?php
namespace bunq\test\Model\Generated\Endpoint;

use bunq\Model\Generated\Endpoint\Payment;
use bunq\Model\Generated\Endpoint\PaymentBatch;
use bunq\Model\Generated\Object\Amount;
use bunq\Model\Generated\Object\LabelMonetaryAccount;
use bunq\Model\Generated\Object\Pointer;
use bunq\test\BunqSdkTestBase;

/**
 * Tests:
 * PaymentBatch
 * Payment
 */
class PaymentBatchTest extends BunqSdkTestBase
{
    /**
     * Test constants
     */
    const PAYMENT_CURRENCY = 'EUR';
    const PAYMENT_DESCRIPTION = 'php sdk Batch test';
    const MAXIMUM_PAYMENT_ENTRIES = 10;

    /**
     */
    public function testSendBatchPayment()
    {
        $response = PaymentBatch::create(
            $this->createPaymentArray()
        );

        self::assertTrue(is_integer($response->getValue()));
    }

    /**
     * @return Payment[]
     */
    private function createPaymentArray(): array
    {
        $allPayment = [];

        while (count($allPayment) < self::MAXIMUM_PAYMENT_ENTRIES) {
            $payment = new Payment(
                new Amount(self::PAYMENT_AMOUNT_DEFAULT, self::PAYMENT_CURRENCY),
                $this->getPointerUserBravo(),
                self::PAYMENT_DESCRIPTION
            );

            $allPayment[] = $payment;
        }

        return $allPayment;
    }
}
{'fraction_non_alphanumeric': 0.11983154670750383, 'fraction_numerical': 0.002679938744257274, 'mean_word_length': 2.540650406504065, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1080988', 'n_tokens_mistral': 823, 'n_tokens_neox': 786, 'n_words': 130}