Completed
Push — develop ( e77623...3cc0f7 )
by Jens
09:01
created

MeDeleteRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 33
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A ofVersion() 0 4 1
A getPath() 0 4 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Request\Me;
7
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Request\AbstractDeleteRequest;
10
use Commercetools\Core\Model\Customer\Customer;
11
use Commercetools\Core\Response\ApiResponseInterface;
12
13
/**
14
 * @package Commercetools\Core\Request\Me
15
 * @link https://dev.commercetools.com/http-api-projects-me-profile.html#delete-customer
16
 * @method Customer mapResponse(ApiResponseInterface $response)
17
 */
18
class MeDeleteRequest extends AbstractDeleteRequest
19
{
20
    protected $resultClass = '\Commercetools\Core\Model\Customer\Customer';
21
22
    /**
23
     * @param int $version
24
     * @param Context $context
25
     */
26 1
    public function __construct($version, Context $context = null)
27
    {
28 1
        parent::__construct(MeEndpoint::endpoint(), null, $version, $context);
29 1
    }
30
31
    /**
32
     * @param string $id
0 ignored issues
show
Bug introduced by
There is no parameter named $id. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
33
     * @param int $version
34
     * @param Context $context
35
     * @return static
36
     */
37 1
    public static function ofVersion($version, Context $context = null)
38
    {
39 1
        return new static($version, $context);
40
    }
41
42
    /**
43
     * @return string
44
     * @internal
45
     */
46 1
    protected function getPath()
47
    {
48 1
        return (string)$this->getEndpoint() . $this->getParamString();
49
    }
50
}
51