Test Failed
Push — develop ( 47e1b5...e72b23 )
by Jens
18:53 queued 15s
created

AbstractByKeyHeadRequest::getPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
c 1
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Commercetools\Core\Request;
4
5
use Commercetools\Core\Client;
6
use Commercetools\Core\Response\ResourceResponse;
7
8
/**
9
 * @package Commercetools\Core\Request
10
 * @method ResourceResponse executeWithClient(Client $client)
11
 */
12
abstract class AbstractByKeyHeadRequest extends AbstractByIdHeadRequest
13
{
14
    /**
15
     * @return string
16
     */
17
    public function getKey()
18
    {
19
        return $this->getId();
20
    }
21
22
    /**
23
     * @param string $key
24
     * @return $this
25
     */
26
    public function setKey($key)
27
    {
28
        return $this->setId($key);
29
    }
30
31
    /**
32
     * @return string
33
     * @internal
34
     */
35
    protected function getPath()
36
    {
37
        return (string)$this->getEndpoint() . '/key=' . $this->getKey() . $this->getParamString();
38
    }
39
}
40