<commit_before><?php

/**
 * Chrono Relais Gateway
 *
 * @author <NAME> <<EMAIL>>
 * @since 2015-01-13
 */

namespace RelayPoint\Chronorelais;

use RelayPoint\Core\AbstractGateway;
use RelayPoint\Core\Address;
use RelayPoint\Core\RelayPointException;

class Gateway extends AbstractGateway
{
    const URL = 'https://www.chronopost.fr/recherchebt-ws-cxf/PointRelaisServiceWS?wsdl';

    const SERVICE_SEARCH = 'rechercheBtParCodeproduitEtCodepostalEtDate';
    const SERVICE_DETAIL = 'rechercheBtParIdChronopostA2Pas';

    protected $soapClient;

    public function __construct()
    {
        parent::__construct();
        $this->soapClient = new \SoapClient(self::URL);
    }

    public function setSoapClient($soapClient)
    {
        $this->soapClient = $soapClient;
    }

    public function getSoapClient()
    {
        return $this->soapClient;
    }

    public function getName()
    {
        return 'Chronorelais';
    }

    public function getDefaultParameters()
    {
        return array(
            'country' => 'FR',
        );
    }

    /**
     * Finds the list of relay points.
     *
     * @param array $parameters Search fields
     * @param boolean $active Turn to false if you only want active relay points
     * @return Address[]
     * @throws RelayPointException
     */<commit_msg>Removed useless method getSoapClient + added doc and enforced parameter type for setSoapClient<commit_after><?php

/**
 * Chrono Relais Gateway
 *
 * @author <NAME> <<EMAIL>>
 * @since 2015-01-13
 */

namespace RelayPoint\Chronorelais;

use RelayPoint\Core\AbstractGateway;
use RelayPoint\Core\Address;
use RelayPoint\Core\RelayPointException;

class Gateway extends AbstractGateway
{
    const URL = 'https://www.chronopost.fr/recherchebt-ws-cxf/PointRelaisServiceWS?wsdl';

    const SERVICE_SEARCH = 'rechercheBtParCodeproduitEtCodepostalEtDate';
    const SERVICE_DETAIL = 'rechercheBtParIdChronopostA2Pas';

    protected $soapClient;

    public function __construct()
    {
        parent::__construct();
        $this->soapClient = new \SoapClient(self::URL);
    }

    /**
     * Defines the SoapClient class which must be used.
     *
     * @param \SoapClient $soapClient SoapClient instance
     */
    public function setSoapClient(\SoapClient $soapClient)
    {
        $this->soapClient = $soapClient;
    }

    public function getName()
    {
        return 'Chronorelais';
    }

    public function getDefaultParameters()
    {
        return array(
            'country' => 'FR',
        );
    }

    /**
     * Finds the list of relay points.
     *
     * @param array $parameters Search fields
     * @param boolean $active Turn to false if you only want active relay points
     * @return Address[]
     * @throws RelayPointException
     */
{'fraction_non_alphanumeric': 0.10190168640114819, 'fraction_numerical': 0.006458557588805167, 'mean_word_length': 2.850828729281768, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 16, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '237088', 'n_tokens_mistral': 888, 'n_tokens_neox': 853, 'n_words': 198}