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.
Test Failed
Push — master ( 37d8a4...bd815b )
by Yong
05:40
created

HistoryTrait   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 57
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getHistory() 0 3 1
A countHistory() 0 3 1
A isRememberHistory() 0 3 1
A rememberHistory() 0 3 1
A referenceHistory() 0 3 1
A notRememberHistory() 0 3 1
A forgetHistory() 0 3 1
1
<?php
2
3
namespace AlibabaCloud\Client\Traits;
4
5
/**
6
 * Trait HistoryTrait
7
 *
8
 * @package AlibabaCloud\Client\Traits
9
 */
10
trait HistoryTrait
11
{
12
    /**
13
     * @var array
14
     */
15
    private static $history = [];
16
17
    /**
18
     * @var bool
19
     */
20
    private static $isRememberHistory = false;
21
22
    /**
23
     * @return array
24
     */
25
    public static function getHistory()
26
    {
27
        return self::$history;
28
    }
29
30
    public static function forgetHistory()
31
    {
32
        self::$history = [];
33
    }
34
35
    public static function notRememberHistory()
36
    {
37
        self::$isRememberHistory = false;
38
    }
39
40
    public static function rememberHistory()
41
    {
42
        self::$isRememberHistory = true;
43
    }
44
45
    /**
46
     * @return bool
47
     */
48
    public static function isRememberHistory()
49
    {
50
        return self::$isRememberHistory;
51
    }
52
53
    /**
54
     * @return array
55
     */
56
    public static function &referenceHistory()
57
    {
58
        return self::$history;
59
    }
60
61
    /**
62
     * @return int
63
     */
64
    public static function countHistory()
65
    {
66
        return count(self::$history);
67
    }
68
}
69