Completed
Push — develop ( 5e8154...a89f38 )
by Jens
08:15
created

MyLineItemDraft::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 11
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 11
loc 11
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\Cart;
7
8
use Commercetools\Core\Model\Channel\ChannelReference;
9
use Commercetools\Core\Model\Common\JsonObject;
10
use Commercetools\Core\Model\Common\LocalizedString;
11
use Commercetools\Core\Model\Common\Money;
12
use Commercetools\Core\Model\Common\Price;
13
use Commercetools\Core\Model\Order\ItemState;
14
use Commercetools\Core\Model\Order\ItemStateCollection;
15
use Commercetools\Core\Model\Product\ProductVariant;
16
use Commercetools\Core\Model\TaxCategory\TaxRate;
17
use Commercetools\Core\Model\CustomField\CustomFieldObject;
18
use Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft;
19
20
/**
21
 * @package Commercetools\Core\Model\Cart
22
 * @link http://dev.commercetools.com/http-api-projects-me-carts.html#mylineitemdraft
23
 * @method string getProductId()
24
 * @method MyLineItemDraft setProductId(string $productId = null)
25
 * @method int getVariantId()
26
 * @method MyLineItemDraft setVariantId(int $variantId = null)
27
 * @method int getQuantity()
28
 * @method MyLineItemDraft setQuantity(int $quantity = null)
29
 * @method ChannelReference getSupplyChannel()
30
 * @method MyLineItemDraft setSupplyChannel(ChannelReference $supplyChannel = null)
31
 * @method ChannelReference getDistributionChannel()
32
 * @method MyLineItemDraft setDistributionChannel(ChannelReference $distributionChannel = null)
33
 * @method CustomFieldObject getCustom()
34
 * @method MyLineItemDraft setCustom(CustomFieldObject $custom = null)
35
 */
36
class MyLineItemDraft extends JsonObject
37
{
38 View Code Duplication
    public function fieldDefinitions()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
39
    {
40
        return [
41
            'productId' => [static::TYPE => 'string'],
42
            'variantId' => [static::TYPE => 'int'],
43
            'quantity' => [static::TYPE => 'int'],
44
            'supplyChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'],
45
            'distributionChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'],
46
            'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'],
47
        ];
48
    }
49
}
50