Code Duplication    Length = 33-33 lines in 2 locations

src/Core/Request/Me/MeDeleteRequest.php 1 location

@@ 20-52 (lines=33) @@
17
 * @method Customer mapResponse(ApiResponseInterface $response)
18
 * @method Customer mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class MeDeleteRequest extends AbstractDeleteRequest
21
{
22
    protected $resultClass = Customer::class;
23
24
    /**
25
     * @param int $version
26
     * @param Context $context
27
     */
28
    public function __construct($version, Context $context = null)
29
    {
30
        parent::__construct(MeEndpoint::endpoint(), null, $version, $context);
31
    }
32
33
    /**
34
     * @param string $id
35
     * @param int $version
36
     * @param Context $context
37
     * @return static
38
     */
39
    public static function ofVersion($version, Context $context = null)
40
    {
41
        return new static($version, $context);
42
    }
43
44
    /**
45
     * @return string
46
     * @internal
47
     */
48
    protected function getPath()
49
    {
50
        return (string)$this->getEndpoint() . $this->getParamString();
51
    }
52
}
53

src/Core/Request/Project/ProjectUpdateRequest.php 1 location

@@ 22-54 (lines=33) @@
19
 * @method Project mapResponse(ApiResponseInterface $response)
20
 * @method Project mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
21
 */
22
class ProjectUpdateRequest extends AbstractUpdateRequest
23
{
24
    protected $resultClass = Project::class;
25
26
    /**
27
     * @param string $version
28
     * @param array $actions
29
     * @param Context $context
30
     */
31
    public function __construct($version, array $actions = [], Context $context = null)
32
    {
33
        parent::__construct(new JsonEndpoint(''), null, $version, $actions, $context);
34
    }
35
36
    /**
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofVersion($version, Context $context = null)
42
    {
43
        return new static($version, [], $context);
44
    }
45
46
    /**
47
     * @return string
48
     * @internal
49
     */
50
    protected function getPath()
51
    {
52
        return (string)$this->getEndpoint() . $this->getParamString();
53
    }
54
}
55