Completed
Pull Request — master (#4)
by
unknown
03:19 queued 18s
created

ClientConfig   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 64
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getLoginUrl() 0 4 1
A getClientId() 0 4 1
A getClientSecret() 0 4 1
A getVersion() 0 4 1
1
<?php namespace Crunch\Salesforce;
2
3
class ClientConfig implements ClientConfigInterface
4
{
5
6
    /**
7
     * @var
8
     */
9
    private $loginUrl;
10
    /**
11
     * @var
12
     */
13
    private $clientId;
14
    /**
15
     * @var
16
     */
17
    private $clientSecret;
18
    /**
19
     * @var string
20
     */
21
    private $version;
22
23
    public function __construct($loginUrl, $clientId, $clientSecret, $version = "v37.0")
24
    {
25
        $this->loginUrl     = $loginUrl;
26
        $this->clientId     = $clientId;
27
        $this->clientSecret = $clientSecret;
28
        $this->version      = $version;
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getLoginUrl()
35
    {
36
        return $this->loginUrl;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getClientId()
43
    {
44
        return $this->clientId;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getClientSecret()
51
    {
52
        return $this->clientSecret;
53
    }
54
55
    /**
56
     * Getter for version
57
     *
58
     * @return string
59
     */
60
    public function getVersion()
61
    {
62
        return $this->version;
63
    }
64
65
66
}