<commit_before><?php
/**
 * Client for Freepaid's SOAP interface
 *
 * @author    <NAME> <<EMAIL>>
 * @copyright 2013-2015 <NAME>.  All rights strictly reserved.
 * @package   plutus
 * @license   MIT
 */

namespace Jacques\Freepaid;

class Client
{
    /**
     * @var \SoapClient|null
     */
    private $soapclient = null;

    /**
     * @var string|null
     */
    private $options = [
        'scheme' => 'http',
        'hostname' => 'ws.dev.freepaid.co.za',
        'port' => '80',
    ];

    /**
     * Constructor
     *
     * @param  array $options
     *
     * @throws \InvalidArgumentException
     *
     * @return void
     */
    public function __construct($options = array())
    {
        if (!array_key_exists('hostname', $options)) {
            throw new \InvalidArgumentException('Please provide a url to use to connect to Freepaid.');
        }

        if (!array_key_exists('username', $options)) {
            throw new \InvalidArgumentException('Please provide the username to use for requests to Freepaid.');
        }

        if (!array_key_exists('password', $options)) {
            throw new \InvalidArgumentException('Please provide the password to use for requests to Freepaid.');
        }

        $this->options = array_merge(
            $this->options,
            $options
        );

        $this->soapclient = new \SoapClient(
            sprintf(
                '%s://%s%s/airtimeplus/?wsdl',
                $this->options['scheme'],
                $this->options['hostname'],
                ($this->options['port'] != 80) ? $this->options['port'] : ''
            ),
            [
                'encoding' => 'US-ASCII',
                'trace' => 1,
                'cache_wsdl' => WSDL_CACHE_NONE,
            ]
        );
    }

    /**
     * Places and order for pinbased virtual vouchers.
     *
     * @param  string  $network
     * @param  integer $amount
     * @param  string  $client_ref
     * @param  string  $quantity
     *
     * @return stdClass
     */
    public function pinbased($network, $amount, $client_ref, $quantity = 1)<commit_msg>Scrutinizer Auto-Fixes<commit_after><?php
/**
 * Client for Freepaid's SOAP interface
 *
 * @author    <NAME> <<EMAIL>>
 * @copyright 2013-2015 <NAME>.  All rights strictly reserved.
 * @package   plutus
 * @license   MIT
 */

namespace Jacques\Freepaid;

class Client
{
    /**
     * @var \SoapClient|null
     */
    private $soapclient = null;

    /**
     * @var string|null
     */
    private $options = [
        'scheme' => 'http',
        'hostname' => 'ws.dev.freepaid.co.za',
        'port' => '80',
    ];

    /**
     * Constructor
     *
     * @param  array $options
     *
     * @throws \InvalidArgumentException
     *
     * @return void
     */
    public function __construct($options = array())
    {
        if (!array_key_exists('hostname', $options)) {
            throw new \InvalidArgumentException('Please provide a url to use to connect to Freepaid.');
        }

        if (!array_key_exists('username', $options)) {
            throw new \InvalidArgumentException('Please provide the username to use for requests to Freepaid.');
        }

        if (!array_key_exists('password', $options)) {
            throw new \InvalidArgumentException('Please provide the password to use for requests to Freepaid.');
        }

        $this->options = array_merge(
            $this->options,
            $options
        );

        $this->soapclient = new \SoapClient(
            sprintf(
                '%s://%s%s/airtimeplus/?wsdl',
                $this->options['scheme'],
                $this->options['hostname'],
                ($this->options['port'] != 80) ? $this->options['port'] : ''
            ),
            [
                'encoding' => 'US-ASCII',
                'trace' => 1,
                'cache_wsdl' => WSDL_CACHE_NONE,
            ]
        );
    }

    /**
     * Places and order for pinbased virtual vouchers.
     *
     * @param  string  $network
     * @param  integer $amount
     * @param  string  $client_ref
     * @param  integer  $quantity
     *
     * @return stdClass
     */
    public function pinbased($network, $amount, $client_ref, $quantity = 1)
{'fraction_non_alphanumeric': 0.13689915174363806, 'fraction_numerical': 0.006597549481621112, 'mean_word_length': 1.8131212723658052, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 37, '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': '6133627', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1212, 'n_words': 288}