Code Duplication    Length = 11-11 lines in 4 locations

src/Model/State/StateDraft.php 1 location

@@ 32-42 (lines=11) @@
29
{
30
    const TYPE_LINE_ITEM_STATE = 'LineItemState';
31
32
    public function fieldDefinitions()
33
    {
34
        return [
35
            'key' => [static::TYPE => 'string'],
36
            'type' => [static::TYPE => 'string'],
37
            'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
38
            'description' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
39
            'initial' => [static::TYPE => 'bool'],
40
            'transitions' => [static::TYPE => '\Commercetools\Core\Model\State\StateReferenceCollection']
41
        ];
42
    }
43
44
    /**
45
     * @param $key

src/Model/ProductDiscount/ProductDiscountDraft.php 1 location

@@ 30-40 (lines=11) @@
27
 */
28
class ProductDiscountDraft extends JsonObject
29
{
30
    public function fieldDefinitions()
31
    {
32
        return [
33
            'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
34
            'description' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
35
            'value' => [static::TYPE => '\Commercetools\Core\Model\ProductDiscount\ProductDiscountValue'],
36
            'predicate' => [static::TYPE => 'string'],
37
            'sortOrder' => [static::TYPE => 'string'],
38
            'isActive' => [static::TYPE => 'bool'],
39
        ];
40
    }
41
42
    /**
43
     * @param LocalizedString $name

src/Request/Products/Command/ProductMoveImageToPositionAction.php 1 location

@@ 29-39 (lines=11) @@
26
 */
27
class ProductMoveImageToPositionAction extends AbstractAction
28
{
29
    public function fieldDefinitions()
30
    {
31
        return [
32
            'action' => [static::TYPE => 'string'],
33
            'variantId' => [static::TYPE => 'int'],
34
            'sku' => [static::TYPE => 'string'],
35
            'imageUrl' => [static::TYPE => 'string'],
36
            'position' => [static::TYPE => 'int'],
37
            'staged' => [static::TYPE => 'bool'],
38
        ];
39
    }
40
41
    /**
42
     * @param array $data

src/Model/Cart/MyLineItemDraft.php 1 location

@@ 38-48 (lines=11) @@
35
 */
36
class MyLineItemDraft extends JsonObject
37
{
38
    public function fieldDefinitions()
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