Completed
Push — master ( e66ec6...ca1e52 )
by Konstantin
15s queued 11s
created

ConnectionQuery   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 46
c 0
b 0
f 0
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAccessLevel() 0 3 1
A getAuthToken() 0 3 1
1
<?php
2
3
namespace linkprofit\Tracker\request;
4
5
use linkprofit\Tracker\Connection;
6
7
/**
8
 * Class ConnectionQuery
9
 *
10
 * @package linkprofit\Tracker\request
11
 */
12
class ConnectionQuery extends BaseRoute
13
{
14
    /**
15
     * @var string|null
16
     */
17
    protected $userUrl = '/authorization/user';
18
19
    /**
20
     * @var string|null
21
     */
22
    protected $adminUrl = '/authorization/employer';
23
24
    /**
25
     * @var string
26
     */
27
    protected $method = 'PUT';
28
29
    /**
30
     * @var array
31
     */
32
    protected $required = ['userName', 'userPassword'];
33
34
    /**
35
     * ConnectionRequestContent constructor.
36
     * @param Connection $connection
37
     */
38 13
    public function __construct(Connection $connection)
39
    {
40 13
        $this->activeFilters = $connection->toArray();
41 13
        $this->accessLevel = $connection->accessLevel;
42 13
    }
43
44
    /**
45
     * @return int
46
     */
47 3
    public function getAccessLevel()
48
    {
49 3
        return $this->accessLevel;
50
    }
51
52
    /**
53
     * @return string
54
     */
55 4
    public function getAuthToken()
56
    {
57 4
        return $this->authToken;
58
    }
59
}
60