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

MessageAttributes   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 39
rs 10
c 0
b 0
f 0
wmc 7
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 MessageAttributes
12
{
13
    // if both SmsAttributes and BatchSmsAttributes are set, only one will take effect
14
    private $attributes;
15
16
    public function __construct(
17
        $attributes = NULL)
18
    {
19
        $this->attributes = $attributes;
20
    }
21
22
    public function setAttributes($attributes)
23
    {
24
        $this->attributes = $attributes;
25
    }
26
27
    public function getAttributes()
28
    {
29
        return $this->attributes;
30
    }
31
32
    public function writeXML(\XMLWriter $xmlWriter)
33
    {
34
        $xmlWriter->startELement(Constants::MESSAGE_ATTRIBUTES);
35
        if ($this->attributes != NULL)
36
        {
37
            if (is_array($this->attributes))
38
            {
39
                foreach ($this->attributes as $subAttributes)
40
                {
41
                    $subAttributes->writeXML($xmlWriter);
42
                }
43
            }
44
            else
45
            {
46
                $this->attributes->writeXML($xmlWriter);
47
            }
48
        }
49
        $xmlWriter->endElement();
50
    }
51
}
52
53
?>
54