Code Duplication    Length = 25-28 lines in 14 locations

src/Request/Me/MeCartUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Cart mapResponse(ApiResponseInterface $response)
18
 * @method Cart mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class MeCartUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Cart\Cart';
23
24
    /**
25
     * @param string $id
26
     * @param string $version
27
     * @param array $actions
28
     * @param Context $context
29
     */
30
    public function __construct($id, $version, array $actions = [], Context $context = null)
31
    {
32
        parent::__construct(MeCartsEndpoint::endpoint(), $id, $version, $actions, $context);
33
    }
34
35
    /**
36
     * @param string $id
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofIdAndVersion($id, $version, Context $context = null)
42
    {
43
        return new static($id, $version, [], $context);
44
    }
45
}
46

src/Request/Products/ProductDeleteByKeyRequest.php 1 location

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

src/Request/Products/ProductUpdateByKeyRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Product mapResponse(ApiResponseInterface $response)
18
 * @method Product mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class ProductUpdateByKeyRequest extends AbstractUpdateByKeyRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Product\Product';
23
24
    /**
25
     * @param string $key
26
     * @param string $version
27
     * @param array $actions
28
     * @param Context $context
29
     */
30
    public function __construct($key, $version, array $actions = [], Context $context = null)
31
    {
32
        parent::__construct(ProductsEndpoint::endpoint(), $key, $version, $actions, $context);
33
    }
34
35
    /**
36
     * @param string $key
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofKeyAndVersion($key, $version, Context $context = null)
42
    {
43
        return new static($key, $version, [], $context);
44
    }
45
}
46

src/Request/Products/ProductUpdateRequest.php 1 location

@@ 22-49 (lines=28) @@
19
 * @method Product mapResponse(ApiResponseInterface $response)
20
 * @method Product mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
21
 */
22
class ProductUpdateRequest extends AbstractUpdateRequest
23
{
24
    use PriceSelectTrait;
25
26
    protected $resultClass = '\Commercetools\Core\Model\Product\Product';
27
28
    /**
29
     * @param string $id
30
     * @param int $version
31
     * @param array $actions
32
     * @param Context $context
33
     */
34
    public function __construct($id, $version, array $actions = [], Context $context = null)
35
    {
36
        parent::__construct(ProductsEndpoint::endpoint(), $id, $version, $actions, $context);
37
    }
38
39
    /**
40
     * @param string $id
41
     * @param int $version
42
     * @param Context $context
43
     * @return static
44
     */
45
    public static function ofIdAndVersion($id, $version, Context $context = null)
46
    {
47
        return new static($id, $version, [], $context);
48
    }
49
}
50

src/Request/ProductTypes/ProductTypeDeleteByKeyRequest.php 1 location

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

src/Request/ProductTypes/ProductTypeDeleteRequest.php 1 location

@@ 20-44 (lines=25) @@
17
 * @method ProductType mapResponse(ApiResponseInterface $response)
18
 * @method ProductType mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class ProductTypeDeleteRequest extends AbstractDeleteRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\ProductType\ProductType';
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(ProductTypesEndpoint::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/Request/ProductTypes/ProductTypeUpdateByKeyRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method ProductType mapResponse(ApiResponseInterface $response)
18
 * @method ProductType mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class ProductTypeUpdateByKeyRequest extends AbstractUpdateByKeyRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\ProductType\ProductType';
23
24
    /**
25
     * @param string $key
26
     * @param string $version
27
     * @param array $actions
28
     * @param Context $context
29
     */
30
    public function __construct($key, $version, array $actions = [], Context $context = null)
31
    {
32
        parent::__construct(ProductTypesEndpoint::endpoint(), $key, $version, $actions, $context);
33
    }
34
35
    /**
36
     * @param string $key
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofKeyAndVersion($key, $version, Context $context = null)
42
    {
43
        return new static($key, $version, [], $context);
44
    }
45
}
46

src/Request/ProductTypes/ProductTypeUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method ProductType mapResponse(ApiResponseInterface $response)
18
 * @method ProductType mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class ProductTypeUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\ProductType\ProductType';
23
24
    /**
25
     * @param string $id
26
     * @param string $version
27
     * @param array $actions
28
     * @param Context $context
29
     */
30
    public function __construct($id, $version, array $actions = [], Context $context = null)
31
    {
32
        parent::__construct(ProductTypesEndpoint::endpoint(), $id, $version, $actions, $context);
33
    }
34
35
    /**
36
     * @param string $id
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofIdAndVersion($id, $version, Context $context = null)
42
    {
43
        return new static($id, $version, [], $context);
44
    }
45
}
46

src/Request/Reviews/ReviewUpdateByKeyRequest.php 1 location

@@ 21-46 (lines=26) @@
18
 * @method Review mapResponse(ApiResponseInterface $response)
19
 * @method Review mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
20
 */
21
class ReviewUpdateByKeyRequest extends AbstractUpdateByKeyRequest
22
{
23
    protected $resultClass = '\Commercetools\Core\Model\Review\Review';
24
25
    /**
26
     * @param string $key
27
     * @param string $version
28
     * @param array $actions
29
     * @param Context $context
30
     */
31
    public function __construct($key, $version, array $actions = [], Context $context = null)
32
    {
33
        parent::__construct(ReviewsEndpoint::endpoint(), $key, $version, $actions, $context);
34
    }
35
36
    /**
37
     * @param string $key
38
     * @param int $version
39
     * @param Context $context
40
     * @return static
41
     */
42
    public static function ofKeyAndVersion($key, $version, Context $context = null)
43
    {
44
        return new static($key, $version, [], $context);
45
    }
46
}
47

src/Request/Subscriptions/SubscriptionDeleteByKeyRequest.php 1 location

@@ 21-45 (lines=25) @@
18
 * @method Subscription mapResponse(ApiResponseInterface $response)
19
 * @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
20
 */
21
class SubscriptionDeleteByKeyRequest extends AbstractDeleteByKeyRequest
22
{
23
    protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription';
24
25
    /**
26
     * @param string $key
27
     * @param int $version
28
     * @param Context $context
29
     */
30
    public function __construct($key, $version, Context $context = null)
31
    {
32
        parent::__construct(SubscriptionsEndpoint::endpoint(), $key, $version, $context);
33
    }
34
35
    /**
36
     * @param string $key
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofKeyAndVersion($key, $version, Context $context = null)
42
    {
43
        return new static($key, $version, $context);
44
    }
45
}
46

src/Request/Subscriptions/SubscriptionUpdateByKeyRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Subscription mapResponse(ApiResponseInterface $response)
18
 * @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class SubscriptionUpdateByKeyRequest extends AbstractUpdateByKeyRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription';
23
24
    /**
25
     * @param string $key
26
     * @param string $version
27
     * @param array $actions
28
     * @param Context $context
29
     */
30
    public function __construct($key, $version, array $actions = [], Context $context = null)
31
    {
32
        parent::__construct(SubscriptionsEndpoint::endpoint(), $key, $version, $actions, $context);
33
    }
34
35
    /**
36
     * @param string $key
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofKeyAndVersion($key, $version, Context $context = null)
42
    {
43
        return new static($key, $version, [], $context);
44
    }
45
}
46

src/Request/Subscriptions/SubscriptionUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Subscription mapResponse(ApiResponseInterface $response)
18
 * @method Subscription mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class SubscriptionUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Subscription\Subscription';
23
24
    /**
25
     * @param string $id
26
     * @param string $version
27
     * @param array $actions
28
     * @param Context $context
29
     */
30
    public function __construct($id, $version, array $actions = [], Context $context = null)
31
    {
32
        parent::__construct(SubscriptionsEndpoint::endpoint(), $id, $version, $actions, $context);
33
    }
34
35
    /**
36
     * @param string $id
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofIdAndVersion($id, $version, Context $context = null)
42
    {
43
        return new static($id, $version, [], $context);
44
    }
45
}
46

src/Request/Types/TypeDeleteByKeyRequest.php 1 location

@@ 21-45 (lines=25) @@
18
 * @method Type mapResponse(ApiResponseInterface $response)
19
 * @method Type mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
20
 */
21
class TypeDeleteByKeyRequest extends AbstractDeleteByKeyRequest
22
{
23
    protected $resultClass = '\Commercetools\Core\Model\Type\Type';
24
25
    /**
26
     * @param string $key
27
     * @param int $version
28
     * @param Context $context
29
     */
30
    public function __construct($key, $version, Context $context = null)
31
    {
32
        parent::__construct(TypesEndpoint::endpoint(), $key, $version, $context);
33
    }
34
35
    /**
36
     * @param string $key
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofKeyAndVersion($key, $version, Context $context = null)
42
    {
43
        return new static($key, $version, $context);
44
    }
45
}
46

src/Request/Types/TypeUpdateByKeyRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Type mapResponse(ApiResponseInterface $response)
18
 * @method Type mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class TypeUpdateByKeyRequest extends AbstractUpdateByKeyRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Type\Type';
23
24
    /**
25
     * @param string $key
26
     * @param string $version
27
     * @param array $actions
28
     * @param Context $context
29
     */
30
    public function __construct($key, $version, array $actions = [], Context $context = null)
31
    {
32
        parent::__construct(TypesEndpoint::endpoint(), $key, $version, $actions, $context);
33
    }
34
35
    /**
36
     * @param string $key
37
     * @param int $version
38
     * @param Context $context
39
     * @return static
40
     */
41
    public static function ofKeyAndVersion($key, $version, Context $context = null)
42
    {
43
        return new static($key, $version, [], $context);
44
    }
45
}
46