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

MeDeleteRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 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