Code Duplication    Length = 21-25 lines in 3 locations

src/Core/Request/CustomObjects/CustomObjectByIdGetRequest.php 1 location

@@ 19-41 (lines=23) @@
16
 * @method CustomObject mapResponse(ApiResponseInterface $response)
17
 * @method CustomObject mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
18
 */
19
class CustomObjectByIdGetRequest extends AbstractByIdGetRequest
20
{
21
    protected $resultClass = CustomObject::class;
22
23
    /**
24
     * @param string $id
25
     * @param Context $context
26
     */
27
    public function __construct($id, Context $context = null)
28
    {
29
        parent::__construct(CustomObjectsEndpoint::endpoint(), $id, $context);
30
    }
31
32
    /**
33
     * @param string $id
34
     * @param Context $context
35
     * @return static
36
     */
37
    public static function ofId($id, Context $context = null)
38
    {
39
        return new static($id, $context);
40
    }
41
}
42

src/Core/Request/CustomObjects/CustomObjectDeleteRequest.php 1 location

@@ 20-44 (lines=25) @@
17
 * @method CustomObject mapResponse(ApiResponseInterface $response)
18
 * @method CustomObject mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class CustomObjectDeleteRequest extends AbstractDeleteRequest
21
{
22
    protected $resultClass = CustomObject::class;
23
24
    /**
25
     * @param string $id
26
     * @param int $version
27
     * @param Context $context
28
     */
29
    public function __construct($id, $version, Context $context = null)
30
    {
31
        parent::__construct(CustomObjectsEndpoint::endpoint(), $id, $version, $context);
32
    }
33
34
    /**
35
     * @param string $id
36
     * @param int $version
37
     * @param Context $context
38
     * @return static
39
     */
40
    public static function ofIdAndVersion($id, $version, Context $context = null)
41
    {
42
        return new static($id, $version, $context);
43
    }
44
}
45

src/Core/Request/CustomObjects/CustomObjectQueryRequest.php 1 location

@@ 20-40 (lines=21) @@
17
 * @method CustomObjectCollection mapResponse(ApiResponseInterface $response)
18
 * @method CustomObjectCollection mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class CustomObjectQueryRequest extends AbstractQueryRequest
21
{
22
    protected $resultClass = CustomObjectCollection::class;
23
24
    /**
25
     * @param Context $context
26
     */
27
    public function __construct(Context $context = null)
28
    {
29
        parent::__construct(CustomObjectsEndpoint::endpoint(), $context);
30
    }
31
32
    /**
33
     * @param Context $context
34
     * @return static
35
     */
36
    public static function of(Context $context = null)
37
    {
38
        return new static($context);
39
    }
40
}
41