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

CreateQueueRequest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

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