SlackApiConfiguration   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 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 77
rs 10
ccs 16
cts 16
cp 1
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A redirectUrl() 0 3 1
A appPermissions() 0 3 1
A appId() 0 3 1
A __construct() 0 6 1
A ourSecretState() 0 3 1
A appSecret() 0 3 1
1
<?php
2
/**
3
 * @author Tharanga Kothalawala <[email protected]>
4
 * @date 31-12-2018
5
 */
6
7
namespace TSK\SSO\ThirdParty\Slack;
8
9
/**
10
 * @package TSK\SSO\ThirdParty\Slack
11
 * @see https://api.slack.com/apps
12
 */
13
class SlackApiConfiguration
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
    /**
37
     * @param string $appId
38
     * @param string $appSecret
39
     * @param string $appPermissions
40
     * @param string $redirectUrl
41
     */
42 2
    public function __construct($appId, $appSecret, $appPermissions, $redirectUrl)
43
    {
44 2
        $this->appId = $appId;
45 2
        $this->appSecret = $appSecret;
46 2
        $this->appPermissions = $appPermissions;
47 2
        $this->redirectUrl = $redirectUrl;
48 2
    }
49
50
    /**
51
     * @return string
52
     */
53 1
    public function appId()
54
    {
55 1
        return $this->appId;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 1
    public function appSecret()
62
    {
63 1
        return $this->appSecret;
64
    }
65
66
    /**
67
     * @return string
68
     */
69 1
    public function appPermissions()
70
    {
71 1
        return $this->appPermissions;
72
    }
73
74
    /**
75
     * @return string
76
     */
77 1
    public function redirectUrl()
78
    {
79 1
        return $this->redirectUrl;
80
    }
81
82
    /**
83
     * This is just to identify that, we initiated the login sequence (not someone else)
84
     *
85
     * @return string
86
     */
87 1
    public function ourSecretState()
88
    {
89 1
        return 'dfeb6ef625880832f61c6f4bd737e11b';
90
    }
91
}
92