SlackApiConfiguration::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 6
rs 10
ccs 5
cts 5
cp 1
crap 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