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

DeleteMessageRequest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
c 2
b 0
f 0
lcom 1
cbo 1
dl 33
loc 33
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\Constants;
5
use AliyunMNS\Requests\BaseRequest;
6
7
class DeleteMessageRequest extends BaseRequest
8
{
9
    private $queueName;
10
    private $receiptHandle;
11
12
    public function __construct($queueName, $receiptHandle)
13
    {
14
        parent::__construct('delete', 'queues/' . $queueName . '/messages');
15
16
        $this->queueName = $queueName;
17
        $this->receiptHandle = $receiptHandle;
18
    }
19
20
    public function getQueueName()
21
    {
22
        return $this->queueName;
23
    }
24
25
    public function getReceiptHandle()
26
    {
27
        return $this->receiptHandle;
28
    }
29
30
    public function generateBody()
31
    {
32
        return NULL;
33
    }
34
35
    public function generateQueryString()
36
    {
37
        return http_build_query(array("ReceiptHandle" => $this->receiptHandle));
38
    }
39
}
40
?>
41