Total Complexity | 6 |
Total Lines | 76 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class LinkedInApiConfiguration |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $appId; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $appSecret; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $appPermissions; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $redirectUrl; |
||
34 | |||
35 | /** |
||
36 | * @param string $appId |
||
37 | * @param string $appSecret |
||
38 | * @param string $appPermissions |
||
39 | * @param string $redirectUrl |
||
40 | */ |
||
41 | 2 | public function __construct($appId, $appSecret, $appPermissions, $redirectUrl) |
|
42 | { |
||
43 | 2 | $this->appId = $appId; |
|
44 | 2 | $this->appSecret = $appSecret; |
|
45 | 2 | $this->appPermissions = $appPermissions; |
|
46 | 2 | $this->redirectUrl = $redirectUrl; |
|
47 | 2 | } |
|
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | 1 | public function appId() |
|
53 | { |
||
54 | 1 | return $this->appId; |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | 1 | public function appSecret() |
|
61 | { |
||
62 | 1 | return $this->appSecret; |
|
63 | } |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | 1 | public function appPermissions() |
|
71 | } |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | 1 | public function redirectUrl() |
|
77 | { |
||
78 | 1 | return $this->redirectUrl; |
|
79 | } |
||
80 | |||
81 | /** |
||
82 | * This is just to identify that, we initiated the login sequence (not someone else) and to prevent CSRF. |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | 1 | public function ourSecretState() |
|
89 | } |
||
90 | } |
||
91 |