GitHubApiConfiguration   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 14
c 1
b 0
f 1
dl 0
loc 77
rs 10
ccs 16
cts 16
cp 1
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A oauthAppName() 0 3 1
A clientSecret() 0 3 1
A clientId() 0 3 1
A __construct() 0 6 1
A redirectUrl() 0 3 1
A ourSecretState() 0 3 1
1
<?php
2
/**
3
 * @author Tharanga Kothalawala <[email protected]>
4
 * @date 29-01-2019
5
 */
6
7
namespace TSK\SSO\ThirdParty\GitHub;
8
9
/**
10
 * @package TSK\SSO\ThirdParty\GitHub
11
 */
12
class GitHubApiConfiguration
13
{
14
    /**
15
     * @var string
16
     */
17
    private $clientId;
18
19
    /**
20
     * @var string
21
     */
22
    private $clientSecret;
23
24
    /**
25
     * @var string
26
     */
27
    private $redirectUrl;
28
29
    /**
30
     * @var string
31
     */
32
    private $oauthAppName;
33
34
    /**
35
     * GitHubApiConfiguration constructor.
36
     * @param string $clientId
37
     * @param string $clientSecret
38
     * @param string $redirectUrl
39
     * @param string $oauthAppName
40
     */
41 2
    public function __construct($clientId, $clientSecret, $redirectUrl, $oauthAppName)
42
    {
43 2
        $this->clientId = $clientId;
44 2
        $this->clientSecret = $clientSecret;
45 2
        $this->redirectUrl = $redirectUrl;
46 2
        $this->oauthAppName = $oauthAppName;
47 2
    }
48
49
    /**
50
     * @return string
51
     */
52 1
    public function clientId()
53
    {
54 1
        return $this->clientId;
55
    }
56
57
    /**
58
     * @return string
59
     */
60 1
    public function clientSecret()
61
    {
62 1
        return $this->clientSecret;
63
    }
64
65
    /**
66
     * @return string
67
     */
68 1
    public function redirectUrl()
69
    {
70 1
        return $this->redirectUrl;
71
    }
72
73
    /**
74
     * @return string
75
     */
76 1
    public function oauthAppName()
77
    {
78 1
        return $this->oauthAppName;
79
    }
80
81
    /**
82
     * This is just to identify that, we initiated the login sequence (not someone else)
83
     *
84
     * @return string
85
     */
86 1
    public function ourSecretState()
87
    {
88 1
        return 'dfeb6ef625880832f61c6f4bd737e11b';
89
    }
90
}
91