Completed
Push — master ( 9db63e...40913a )
by Oleksandr
24s queued 13s
created

getWorkOrderId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Payone\Business\Api\Response\Container;
9
10
class KlarnaGenericPaymentResponseContainer extends AbstractResponseContainer
11
{
12
    protected const ADD_PAYDATA_REPLACEMENT_PATTERN = '/add_paydata\[(.*)\]/';
13
14
    /**
15
     * @var string
16
     */
17
    protected $workorderid;
18
19
    /**
20
     * @var string|null
21
     */
22
    protected $client_token;
23
24
    /**
25
     * @param array $params
26
     */
27
    public function __construct(array $params = [])
28
    {
29
        parent::__construct($params);
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getWorkOrderId(): string
36
    {
37
        return $this->workorderid;
38
    }
39
40
    /**
41
     * @param string $workOrderId
42
     *
43
     * @return void
44
     */
45
    public function setWorkOrderId(string $workOrderId): void
46
    {
47
        $this->workorderid = $workOrderId;
48
    }
49
50
    /**
51
     * @return string|null
52
     */
53
    public function getClientToken(): ?string
54
    {
55
        return $this->client_token;
56
    }
57
58
    /**
59
     * @param string $clientToken
60
     *
61
     * @return void
62
     */
63
    public function setClientToken(string $clientToken): void
64
    {
65
        $this->client_token = $clientToken;
66
    }
67
68
    /**
69
     * @param string $key
70
     *
71
     * @return string
72
     */
73
    protected function getPreparedKey(string $key): string
74
    {
75
        $key = preg_replace(self::ADD_PAYDATA_REPLACEMENT_PATTERN, '$1', $key);
76
77
        return ucwords(str_replace('_', ' ', $key));
78
    }
79
}
80