<commit_before><?php

class CardTransactionController
{
    /**
     * Initialize the library in your constructor using
     * your environment, api key, and password
     */
    public function __construct()
    {
        $environment = 'staging'; // or 'production'
        \tdanielcox\Bluesnap\Bluesnap::init($environment, 'YOUR_API_KEY', 'YOUR_API_PASSWORD');
    }

    /**
     * Create a new Transaction (with vendor & vaultedShopper)
     *
     * @param int $vaulted_shopper_id
     * @param int $vendor_id
     * @return \tdanielcox\Bluesnap\Models\CardTransaction
     */
    public function createTransaction($vaulted_shopper_id, $vendor_id)
    {
        $response = \tdanielcox\Bluesnap\CardTransaction::create([
            'creditCard' => [
                'cardLastFourDigits' => '1111',
                'securityCode' => '111',
                'cardType' => 'VISA',
            ],
            'vendorInfo' => [
                'vendorId' => $vaulted_shopper_id,
                'commissionAmount' => 4.00,
            ],
            'vaultedShopperId' => $vendor_id,
            'amount' => 10.00,
            'currency' => 'USD',
            'recurringTransaction' => 'ECOMMERCE',
            'cardTransactionType' => 'AUTH_ONLY',
            'softDescriptor' => 'Your description',
        ]);

        if ($response->failed()) {
            $error = $response->data;

            // handle error
        }

        $transaction = $response->data;

        return $transaction;
    }

    /**
     * Get a Transaction
     *
     * @param int $transaction_id
     * @return \tdanielcox\Bluesnap\Models\CardTransaction
     */
    public function getTransaction($transaction_id)
    {
        $response = \tdanielcox\Bluesnap\CardTransaction::get($transaction_id);

        if ($response->failed()) {
            $error = $response->data;

            // handle error
        }

        $transaction = $response->data;

        return $transaction;
    }
<commit_msg>added more examples<commit_after><?php

class CardTransactionController
{
    /**
     * Initialize the library in your constructor using
     * your environment, api key, and password
     */
    public function __construct()
    {
        $environment = 'staging'; // or 'production'
        \tdanielcox\Bluesnap\Bluesnap::init($environment, 'YOUR_API_KEY', 'YOUR_API_PASSWORD');
    }

    /**
     * Create a new Transaction (with vendor & vaultedShopper)
     *
     * @param int $vaulted_shopper_id
     * @param int $vendor_id
     * @return \tdanielcox\Bluesnap\Models\CardTransaction
     */
    public function createTransaction($vaulted_shopper_id, $vendor_id)
    {
        $response = \tdanielcox\Bluesnap\CardTransaction::create([
            'creditCard' => [
                'cardLastFourDigits' => '1111',
                'securityCode' => '111',
                'cardType' => 'VISA',
            ],
            'vendorInfo' => [
                'vendorId' => $vaulted_shopper_id,
                'commissionAmount' => 4.00,
            ],
            'vaultedShopperId' => $vendor_id,
            'amount' => 10.00,
            'currency' => 'USD',
            'recurringTransaction' => 'ECOMMERCE',
            'cardTransactionType' => 'AUTH_ONLY',
            'softDescriptor' => 'Your description',
        ]);

        if ($response->failed())
        {
            $error = $response->data;

            // handle error
        }

        $transaction = $response->data;

        return $transaction;
    }

    /**
     * Capture a previously authorized transaction
     *
     * @param int $transaction_id
     * @return \tdanielcox\Bluesnap\Models\CardTransaction
     */
    public function captureTransaction($transaction_id)
    {
        $response = \tdanielcox\Bluesnap\CardTransaction::update($transaction_id, [
            'transactionId' => $transaction_id,
            'cardTransactionType' => 'CAPTURE',
        ]);

        if ($response->failed())
        {
            $error = $response->data;

            // handle error
        }

        $transaction = $response->data;

        return $transaction;
    }

    /**
     * Get a Transaction
     *
     * @param int $transaction_id
     * @return \tdanielcox\Bluesnap\Models\CardTransaction
     */
    public function getTransaction($transaction_id)
    {
        $response = \tdanielcox\Bluesnap\CardTransaction::get($transaction_id);

        if ($response->failed())
        {
            $error = $response->data;

            // handle error
        }

        $transaction = $response->data;

        return $transaction;
    }

{'fraction_non_alphanumeric': 0.12548764629388817, 'fraction_numerical': 0.006068487212830516, 'mean_word_length': 1.9025157232704402, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 46, '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': '7564066', 'n_tokens_mistral': 1376, 'n_tokens_neox': 1297, 'n_words': 241}