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.
Completed
Push — master ( 9a7ea4...53d770 )
by Yang
02:32
created

BatchDeleteMessageRequest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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