GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Config::__construct()   A
last analyzed

Complexity

Conditions 3
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 3
nc 1
nop 2
1
<?php
2
3
/**
4
 * Part of Dear package.
5
 *
6
 * @package Dear
7
 * @version 1.0
8
 * @author Umair Mahmood
9
 * @license MIT
10
 * @copyright Copyright (c) 2019 Umair Mahmood
11
 *
12
 */
13
14
namespace UmiMood\Dear;
15
16
class Config
17
{
18
    /**
19
     * @var string
20
     */
21
    protected $accountId;
22
23
    /**
24
     * @var string
25
     */
26
    protected $applicationKey;
27
28
    /**
29
     * Config constructor.
30
     * @param string $accountId
31
     * @param string $applicationKey
32
     */
33
    public function __construct($accountId = null, $applicationKey = null)
34
    {
35
        $this->setAccountId($accountId ?: getenv('DEAR_ACCOUNT_ID'));
36
        $this->setApplicationKey($applicationKey ?: getenv('DEAR_APPLICATION_KEY'));
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getAccountId()
43
    {
44
        return $this->accountId;
45
    }
46
47
    /**
48
     * @param string $accountId
49
     */
50
    public function setAccountId($accountId)
51
    {
52
        $this->accountId = $accountId;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getApplicationKey()
59
    {
60
        return $this->applicationKey;
61
    }
62
63
    /**
64
     * @param string $applicationKey
65
     */
66
    public function setApplicationKey($applicationKey)
67
    {
68
        $this->applicationKey = $applicationKey;
69
    }
70
}