HasSdkBaseInfo::getAuthorization()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CloudyCity\UCMarketingSDK\Kernel\Traits;
4
5
trait HasSdkBaseInfo
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $username;
11
12
    /**
13
     * @var string
14
     */
15
    protected $password;
16
17
    /**
18
     * @var string
19
     */
20
    protected $token;
21
22
    /**
23
     * @return string
24
     */
25
    protected function getUsername()
26
    {
27
        return $this->username;
28
    }
29
30
    /**
31
     * @param string $username
32
     */
33
    protected function setUsername($username)
34
    {
35
        $this->username = $username;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getPassword()
42
    {
43
        return $this->password;
44
    }
45
46
    /**
47
     * @param string $password
48
     */
49
    public function setPassword($password)
50
    {
51
        $this->password = $password;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    protected function getToken()
58
    {
59
        return $this->token;
60
    }
61
62
    /**
63
     * @param string $token
64
     */
65
    protected function setToken($token)
66
    {
67
        $this->token = $token;
68
    }
69
70
    /**
71
     * @return array
72
     */
73
    protected function getAuthorization()
74
    {
75
        return [
76
            'username' => $this->getUsername(),
77
            'password' => $this->getPassword(),
78
            'token'    => $this->getToken(),
79
        ];
80
    }
81
}
82