Completed
Push — master ( 995814...b8a5e6 )
by Juuso
12:56 queued 08:00
created

AlgoliaConfig::getApplicationId()   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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
4
namespace leinonen\Yii2Algolia;
5
6
7
class AlgoliaConfig
8
{
9
    /**
10
     * @var string
11
     */
12
    private $applicationId;
13
14
    /**
15
     * @var string
16
     */
17
    private $apiKey;
18
19
    /**
20
     * @var array|null
21
     */
22
    private $hostsArray;
23
24
    /**
25
     * @var array
26
     */
27
    private $options;
28
29
    /**
30
     * Initiates a new AlgoliaConfig.
31
     *
32
     * @param string $applicationId The application ID you have in your admin interface
33
     * @param string $apiKey A valid API key for the service
34
     * @param null|array $hostsArray The list of hosts that you have received for the service
35
     * @param array $options
36
     */
37 25
    public function __construct($applicationId, $apiKey, $hostsArray = null, $options = [])
38
    {
39 25
        $this->applicationId = $applicationId;
40 25
        $this->apiKey = $apiKey;
41 25
        $this->hostsArray = $hostsArray;
42 25
        $this->options = $options;
43 25
    }
44
45
    /**
46
     * @return string
47
     */
48 20
    public function getApplicationId()
49
    {
50 20
        return $this->applicationId;
51
    }
52
53
    /**
54
     * @return string
55
     */
56 20
    public function getApiKey()
57
    {
58 20
        return $this->apiKey;
59
    }
60
61
    /**
62
     * @return array|null
63
     */
64 20
    public function getHostsArray()
65
    {
66 20
        return $this->hostsArray;
67
    }
68
69
    /**
70
     * @return array
71
     */
72 20
    public function getOptions()
73
    {
74 20
        return $this->options;
75
    }
76
}
77