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.
Passed
Branch master (b10c57)
by milkmeowo
02:58
created

AccountAttributes   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 50
rs 10
c 0
b 0
f 0
wmc 10
1
<?php
2
namespace AliyunMNS\Model;
3
4
use AliyunMNS\Constants;
5
6
/**
7
 * Please refer to
8
 * https://docs.aliyun.com/?spm=#/pub/mns/api_reference/intro&intro
9
 * for more details
10
 */
11
class AccountAttributes
12
{
13
    private $loggingBucket;
14
15
    public function __construct(
16
        $loggingBucket = NULL)
17
    {
18
        $this->loggingBucket = $loggingBucket;
19
    }
20
21
    public function setLoggingBucket($loggingBucket)
22
    {
23
        $this->loggingBucket = $loggingBucket;
24
    }
25
26
    public function getLoggingBucket()
27
    {
28
        return $this->loggingBucket;
29
    }
30
31
    public function writeXML(\XMLWriter $xmlWriter)
32
    {
33
        if ($this->loggingBucket !== NULL)
34
        {
35
            $xmlWriter->writeElement(Constants::LOGGING_BUCKET, $this->loggingBucket);
36
        }
37
    }
38
39
    static public function fromXML(\XMLReader $xmlReader)
40
    {
41
        $loggingBucket = NULL;
42
43
        while ($xmlReader->read())
44
        {
45
            if ($xmlReader->nodeType == \XMLReader::ELEMENT)
46
            {
47
                switch ($xmlReader->name) {
48
                case 'LoggingBucket':
49
                    $xmlReader->read();
50
                    if ($xmlReader->nodeType == \XMLReader::TEXT)
51
                    {
52
                        $loggingBucket = $xmlReader->value;
53
                    }
54
                    break;
55
                }
56
            }
57
        }
58
59
        $attributes = new AccountAttributes($loggingBucket);
60
        return $attributes;
61
    }
62
}
63
64
?>
65