Passed
Push — main ( 4dc4a3...97513a )
by Stas
14:40 queued 04:40
created

OrderResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A parseDataModel() 0 4 2
1
<?php
2
3
namespace Huawei\IAP\Response;
4
5
/**
6
 * Class OrderResponse
7
 * Response returned in case of Order verification
8
 * @see https://developer.huawei.com/consumer/en/doc/development/HMS-References/iap-api-order-service-purchase-token-verification-v4
9
 *
10
 * @package Huawei\IAP\Response
11
 */
12
class OrderResponse extends ValidationResponse
13
{
14
    protected function parseDataModel(array $raw)
15
    {
16
        if (isset($raw['purchaseTokenData'])) {
17
            $this->dataModel = \json_decode($raw['purchaseTokenData'], true);
18
        }
19
    }
20
}
21