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

SubscribeRequest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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