Passed
Push — develop ( a27dd2...8f2abb )
by Edwin
03:09
created

Config::getAccessToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace ShopifyClient;
4
5
class Config
6
{
7
    /**
8
     * @var string
9
     */
10
    private $domain;
11
12
    /**
13
     * @var string
14
     */
15
    private $key;
16
17
    /**
18
     * @var string
19
     */
20
    private $secret;
21
22
    /**
23
     * @var array
24
     */
25
    private $resources;
26
27
    /**
28
     * @var string
29
     */
30
    private $accessToken;
31
32
    /**
33
     * Config constructor.
34
     * @param string $domain
35
     * @param string $key
36
     * @param string $secret
37
     * @param array $resources
38
     * @param string|null $accessToken
39
     */
40 4
    public function __construct(
41
        string $domain,
42
        string $key,
43
        string $secret,
44
        array $resources = [],
45
        string $accessToken = null
46
    ) {
47 4
        $this->domain      = $domain;
48 4
        $this->key         = $key;
49 4
        $this->secret      = $secret;
50 4
        $this->resources   = $resources;
51 4
        $this->accessToken = $accessToken;
52 4
    }
53
54
    /**
55
     * @return string
56
     */
57 4
    public function getDomain(): string
58
    {
59 4
        return $this->domain;
60
    }
61
62
    /**
63
     * @return string
64
     */
65 3
    public function getKey(): string
66
    {
67 3
        return $this->key;
68
    }
69
70
    /**
71
     * @return string
72
     */
73 3
    public function getSecret(): string
74
    {
75 3
        return $this->secret;
76
    }
77
78
    /**
79
     * @return array
80
     */
81 4
    public function getResources(): array
82
    {
83 4
        return $this->resources;
84
    }
85
86
    /**
87
     * @return string|null
88
     */
89 4
    public function getAccessToken()
90
    {
91 4
        return $this->accessToken;
92
    }
93
}
94