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

SetAccountAttributesRequest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 5
1
<?php
2
namespace AliyunMNS\Requests;
3
4
use AliyunMNS\Constants;
5
use AliyunMNS\Requests\BaseRequest;
6
use AliyunMNS\Model\AccountAttributes;
7
8
class SetAccountAttributesRequest extends BaseRequest
9
{
10
    private $attributes;
11
12
    public function __construct(AccountAttributes $attributes = NULL)
13
    {
14
        parent::__construct('put', '/?accountmeta=true');
15
16
        if ($attributes == NULL)
17
        {
18
            $attributes = new AccountAttributes;
19
        }
20
21
        $this->attributes = $attributes;
22
    }
23
24
    public function getAccountAttributes()
25
    {
26
        return $this->attributes;
27
    }
28
29
    public function generateBody()
30
    {
31
        $xmlWriter = new \XMLWriter;
32
        $xmlWriter->openMemory();
33
        $xmlWriter->startDocument("1.0", "UTF-8");
34
        $xmlWriter->startElementNS(NULL, "Account", Constants::MNS_XML_NAMESPACE);
35
        $this->attributes->writeXML($xmlWriter);
36
        $xmlWriter->endElement();
37
        $xmlWriter->endDocument();
38
        return $xmlWriter->outputMemory();
39
    }
40
41
    public function generateQueryString()
42
    {
43
        return NULL;
44
    }
45
}
46
?>
47