<commit_before><?php

/*
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Th3Mouk\FreeMobileSMSNotif;

use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\ClientInterface as GuzzleClientInterface;
use GuzzleHttp\Exception\RequestException;

final class Client implements ClientInterface
{
    /**
     * URL to contact Free Mobile API.
     */
    const API_URL = 'https://smsapi.free-mobile.fr/sendmsg';

    /**
     * Login to connect at the Free Mobile API.
     *
     * @var string
     */
    private $login;

    /**
     * Authentication key generated by the Free Mobile web interface.
     *
     * @var string
     */
    private $key;

    /**
     * HTTP Client to communicate throught the web.
     *
     * @var GuzzleClient
     */
    private $httpClient;

    /**
     * Client constructor.
     *
     * @param string $login
     * @param string $key
     */
    public function __construct($login, $key)
    {
        $this->login = $login;
        $this->key = $key;
        $this->httpClient = new GuzzleClient();
    }

    /**
     * {@inheritdoc}
     */
    public function send($message)
    {
        try {
            return $this->httpClient->post(self::API_URL, [
                'query' => [
                    'user' => $this->login,
                    'pass' => $this->key,
                    'msg' => (string) $message,
                ],
            ]);
        } catch (RequestException $exception) {
            return $exception->getResponse();
        }
    }

    /**
     * @return string
     */
    public function getLogin()
    {
        return $this->login;
    }

    /**
     * @return string
     */
    public function getkey()
    {
        return $this->key;
    }

    /**
     * @return GuzzleClient
     */
    public function getHttpClient()
    {
        return $this->httpClient;
    }

    /**
     * @param GuzzleClientInterface $httpClient
     */
    public function setHttpClient(GuzzleClientInterface $httpClient)
    {
        $this->httpClient = $httpClient;
    }
}<commit_msg>Fix the PHPDoc for the HTTP Client<commit_after><?php

/*
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Th3Mouk\FreeMobileSMSNotif;

use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\ClientInterface as GuzzleClientInterface;
use GuzzleHttp\Exception\RequestException;

final class Client implements ClientInterface
{
    /**
     * URL to contact Free Mobile API.
     */
    const API_URL = 'https://smsapi.free-mobile.fr/sendmsg';

    /**
     * Login to connect at the Free Mobile API.
     *
     * @var string
     */
    private $login;

    /**
     * Authentication key generated by the Free Mobile web interface.
     *
     * @var string
     */
    private $key;

    /**
     * HTTP Client to communicate throught the web.
     *
     * @var GuzzleClientInterface
     */
    private $httpClient;

    /**
     * Client constructor.
     *
     * @param string $login
     * @param string $key
     */
    public function __construct($login, $key)
    {
        $this->login = $login;
        $this->key = $key;
        $this->httpClient = new GuzzleClient();
    }

    /**
     * {@inheritdoc}
     */
    public function send($message)
    {
        try {
            return $this->httpClient->post(self::API_URL, [
                'query' => [
                    'user' => $this->login,
                    'pass' => $this->key,
                    'msg' => (string) $message,
                ],
            ]);
        } catch (RequestException $exception) {
            return $exception->getResponse();
        }
    }

    /**
     * @return string
     */
    public function getLogin()
    {
        return $this->login;
    }

    /**
     * @return string
     */
    public function getkey()
    {
        return $this->key;
    }

    /**
     * @return GuzzleClientInterface
     */
    public function getHttpClient()
    {
        return $this->httpClient;
    }

    /**
     * @param GuzzleClientInterface $httpClient
     */
    public function setHttpClient(GuzzleClientInterface $httpClient)
    {
        $this->httpClient = $httpClient;
    }
}
{'fraction_non_alphanumeric': 0.1201187485727335, 'fraction_numerical': 0.00045672527974423386, 'mean_word_length': 1.7987220447284344, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 41, 'https://': 2, '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': '2431726', 'n_tokens_mistral': 1295, 'n_tokens_neox': 1245, 'n_words': 314}