Total Complexity | 6 |
Total Lines | 77 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
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() |
|
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() |
|
91 |