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

ListQueueRequest   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 79
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 12
c 3
b 0
f 0
lcom 1
cbo 1
dl 79
loc 79
rs 10

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
namespace AliyunMNS\Requests;
3
4
use AliyunMNS\Requests\BaseRequest;
5
6
class ListQueueRequest extends BaseRequest
7
{
8
    private $retNum;
9
    private $prefix;
10
    private $marker;
11
12
    public function __construct($retNum = NULL, $prefix = NULL, $marker = NULL)
13
    {
14
        parent::__construct('get', 'queues');
15
16
        $this->setRetNum($retNum);
17
        $this->setPrefix($prefix);
18
        $this->setMarker($marker);
19
    }
20
21
    public function getRetNum()
22
    {
23
        return $this->retNum;
24
    }
25
26
    public function setRetNum($retNum)
27
    {
28
        $this->retNum = $retNum;
29
        if ($retNum != NULL)
30
        {
31
            $this->setHeader("x-mns-ret-number", $retNum);
32
        }
33
        else
34
        {
35
            $this->removeHeader("x-mns-ret-number");
36
        }
37
    }
38
39
    public function getPrefix()
40
    {
41
        return $this->prefix;
42
    }
43
44
    public function setPrefix($prefix)
45
    {
46
        $this->prefis = $prefix;
47
        if ($prefix != NULL)
48
        {
49
            $this->setHeader("x-mns-prefix", $prefix);
50
        }
51
        else
52
        {
53
            $this->removeHeader("x-mns-prefix");
54
        }
55
    }
56
57
    public function getMarker()
58
    {
59
        return $this->marker;
60
    }
61
62
    public function setMarker($marker)
63
    {
64
        $this->marker = $marker;
65
        if ($marker != NULL)
66
        {
67
            $this->setHeader("x-mns-marker", $marker);
68
        }
69
        else
70
        {
71
            $this->removeHeader("x-mns-marker");
72
        }
73
    }
74
75
    public function generateBody()
76
    {
77
        return NULL;
78
    }
79
80
    public function generateQueryString()
81
    {
82
        return NULL;
83
    }
84
}
85
86
?>
87