Test Failed
Push — develop ( cf0637...ea0f43 )
by Yuji
08:02
created

UpdateOrderStatusApi::distillResponse()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
namespace Shippinno\YahooShoppingJp\Api;
4
5
use Shippinno\YahooShoppingJp\HttpMethod;
6
use Shippinno\YahooShoppingJp\Exception\DistillationException;
7
8
class UpdateOrderStatusApi extends AbstractApi
9
{
10
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function distillResponse(array $response): array
15
    {
16
        if (!isset($response['Result'])) {
17
            throw new DistillationException;
18
        }
19
20
        return $response;
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function httpMethod(): HttpMethod
27
    {
28
        return HttpMethod::POST();
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function path(): string
35
    {
36
        return 'orderStatusChange';
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function expectsFormFields(): bool
43
    {
44
        return false;
45
    }
46
47
}
48