Completed
Push — master ( 2f8322...f18f78 )
by Gaël
11:24
created

LaPoste   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace DansMaCulotte\LaPoste;
4
5
use GuzzleHttp\Client as HttpClient;
6
7
class LaPoste
8
{
9
    /** @var string */
10
    const API_URL = 'https://api.laposte.fr';
11
12
    /** @var HttpClient */
13
    public $httpClient;
14
15
    /**
16
     * Construct Method
17
     *
18
     * @param string $apiKey La Poste Developer API Key
19
     */
20
    public function __construct(string $apiKey)
21
    {
22
        $this->httpClient = new HttpClient(
23
            [
24
                'base_uri' =>  self::API_URL,
25
                'headers' => [
26
                    'X-Okapi-Key' => $apiKey,
27
                ],
28
            ]
29
        );
30
    }
31
}
32