Passed
Push — master ( 7aff42...e66799 )
by Dmitry
01:30
created

Identity::getPartnerPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 1
1
<?php
2
/**
3
 * @project Promopult Integra client library
4
 */
5
6
namespace Promopult\Integra;
7
8
/**
9
 * Class Identity
10
 *
11
 * @author Dmitry Gladyshev <[email protected]>
12
 * @since 1.0
13
 */
14
final class Identity implements \Promopult\Integra\IdentityInterface
15
{
16
    /**
17
     * @var string
18
     */
19
    private $hash;
20
21
    /**
22
     * @var string
23
     */
24
    private $cryptKey;
25
26
    /**
27
     * @var string
28
     */
29
    private $partnerPath;
30
31
    /**
32
     * @var string
33
     */
34
    private $apiHost;
35
36
    /**
37
     * Identity constructor.
38
     *
39
     * @param string $hash
40
     * @param string $cryptKey
41
     * @param string $partnerPath
42
     * @param string $apiHost
43
     */
44
    public function __construct(
45
        string $hash,
46
        string $cryptKey,
47
        string $partnerPath = 'iframe',
48
        string $apiHost = 'https://api.promopult.org'
49
    ) {
50
        $this->hash = $hash;
51
        $this->cryptKey = $cryptKey;
52
        $this->partnerPath = $partnerPath;
53
        $this->apiHost = $apiHost;
54
    }
55
56
    /**
57
     * {@inheritDoc}
58
     */
59
    public function getHash(): string
60
    {
61
        return $this->hash;
62
    }
63
64
    /**
65
     * {@inheritDoc}
66
     */
67
    public function getPartnerPath(): string
68
    {
69
        return  $this->partnerPath;
70
    }
71
72
    /**
73
     * {@inheritDoc}
74
     */
75
    public function getCryptKey(): string
76
    {
77
        return $this->cryptKey;
78
    }
79
80
    /**
81
     * {@inheritDoc}
82
     */
83
    public function getApiHost(): string
84
    {
85
        return $this->apiHost;
86
    }
87
}
88