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

AbstractByKeyHeadRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
dl 0
loc 26
c 1
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setKey() 0 3 1
A getKey() 0 3 1
A getPath() 0 3 1
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