Code Duplication    Length = 26-28 lines in 21 locations

src/Request/CartDiscounts/CartDiscountUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method CartDiscount mapResponse(ApiResponseInterface $response)
18
 * @method CartDiscount mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class CartDiscountUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\CartDiscount\CartDiscount';
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(CartDiscountsEndpoint::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/Carts/CartUpdateRequest.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 CartUpdateRequest 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(CartsEndpoint::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/Categories/CategoryUpdateRequest.php 1 location

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

src/Request/Channels/ChannelUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Channel mapResponse(ApiResponseInterface $response)
18
 * @method Channel mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class ChannelUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Channel\Channel';
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(ChannelsEndpoint::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/CustomerGroups/CustomerGroupUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method CustomerGroup mapResponse(ApiResponseInterface $response)
18
 * @method CustomerGroup mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class CustomerGroupUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\CustomerGroup\CustomerGroup';
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(CustomerGroupsEndpoint::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/Customers/CustomerUpdateRequest.php 1 location

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

src/Request/DiscountCodes/DiscountCodeUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method DiscountCode mapResponse(ApiResponseInterface $response)
18
 * @method DiscountCode mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class DiscountCodeUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\DiscountCode\DiscountCode';
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(DiscountCodesEndpoint::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/Inventory/InventoryUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method InventoryEntry mapResponse(ApiResponseInterface $response)
18
 * @method InventoryEntry mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class InventoryUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Inventory\InventoryEntry';
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(InventoryEndpoint::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/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/Orders/OrderUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Order mapResponse(ApiResponseInterface $response)
18
 * @method Order mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class OrderUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Order\Order';
23
24
    /**
25
     * @param string $id
26
     * @param int $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(OrdersEndpoint::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/Payments/PaymentUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Payment mapResponse(ApiResponseInterface $response)
18
 * @method Payment mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class PaymentUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Payment\Payment';
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(PaymentsEndpoint::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/ProductDiscounts/ProductDiscountUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method ProductDiscount mapResponse(ApiResponseInterface $response)
18
 * @method ProductDiscount mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class ProductDiscountUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\ProductDiscount\ProductDiscount';
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(ProductDiscountsEndpoint::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/ProductDeleteRequest.php 1 location

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

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/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/ShippingMethods/ShippingMethodUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method ShippingMethod mapResponse(ApiResponseInterface $response)
18
 * @method ShippingMethod mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class ShippingMethodUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\ShippingMethod\ShippingMethod';
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(ShippingMethodsEndpoint::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/States/StateUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method State mapResponse(ApiResponseInterface $response)
18
 * @method State mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class StateUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\State\State';
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(StatesEndpoint::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/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/TaxCategories/TaxCategoryUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method TaxCategory mapResponse(ApiResponseInterface $response)
18
 * @method TaxCategory mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class TaxCategoryUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\TaxCategory\TaxCategory';
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(TaxCategoriesEndpoint::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/TypeUpdateRequest.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 TypeUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Type\Type';
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(TypesEndpoint::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/Zones/ZoneUpdateRequest.php 1 location

@@ 20-45 (lines=26) @@
17
 * @method Zone mapResponse(ApiResponseInterface $response)
18
 * @method Zone mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class ZoneUpdateRequest extends AbstractUpdateRequest
21
{
22
    protected $resultClass = '\Commercetools\Core\Model\Zone\Zone';
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(ZonesEndpoint::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