Test Failed
Push — develop ( 9e3f9b...05a047 )
by Edwin
02:28
created

Config::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 4
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
     * Config constructor.
29
     * @param string $domain
30
     * @param string $key
31
     * @param string $secret
32
     * @param array $resources
33
     */
34 3
    public function __construct(string $domain, string $key, string $secret, array $resources = [])
35
    {
36 3
        $this->domain    = $domain;
37 3
        $this->key       = $key;
38 3
        $this->secret    = $secret;
39 3
        $this->resources = $resources;
40 3
    }
41
42
    /**
43
     * @return string
44
     */
45 3
    public function getDomain(): string
46
    {
47 3
        return $this->domain;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 3
    public function getKey(): string
54
    {
55 3
        return $this->key;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 3
    public function getSecret(): string
62
    {
63 3
        return $this->secret;
64
    }
65
66
    /**
67
     * @return array
68
     */
69 3
    public function getResources(): array
70
    {
71 3
        return $this->resources;
72
    }
73
}
74