FetchProductConfig   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 7
c 1
b 0
f 0
dl 0
loc 28
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getXml() 0 3 1
A getHeaders() 0 4 1
A getMethod() 0 3 1
A getUrl() 0 3 1
A isExpectXml() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Bpost\BpostApiClient\Bpost\HttpRequestBuilder;
5
6
use Bpost\BpostApiClient\Common\ApiVersions;
7
8
class FetchProductConfig implements HttpRequestBuilderInterface
9
{
10
    public function getXml(): ?string
11
    {
12
        return null;
13
    }
14
15
16
    public function getHeaders(): array
17
    {
18
        return [
19
            'Accept: application/vnd.bpost.shm-productConfiguration-' . ApiVersions::V3_1 . '+XML',
20
        ];
21
    }
22
23
    public function getUrl(): string
24
    {
25
        return '/productconfig';
26
    }
27
28
    public function isExpectXml(): bool
29
    {
30
        return true;
31
    }
32
33
    public function getMethod(): string
34
    {
35
        return self::METHOD_GET;
36
    }
37
}
38