Code Duplication    Length = 15-15 lines in 2 locations

src/Model/Cart/CustomLineItemDraft.php 1 location

@@ 35-49 (lines=15) @@
32
 * @method ExternalTaxRateDraft getExternalTaxRate()
33
 * @method CustomLineItemDraft setExternalTaxRate(ExternalTaxRateDraft $externalTaxRate = null)
34
 */
35
class CustomLineItemDraft extends JsonObject
36
{
37
    public function fieldDefinitions()
38
    {
39
        return [
40
            'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
41
            'money' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'],
42
            'slug' => [static::TYPE => 'string'],
43
            'quantity' => [static::TYPE => 'int'],
44
            'taxCategory' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\TaxCategoryReference'],
45
            'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'],
46
            'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'],
47
        ];
48
    }
49
}
50

src/Model/Cart/LineItemDraft.php 1 location

@@ 38-52 (lines=15) @@
35
 * @method ExternalTaxRateDraft getExternalTaxRate()
36
 * @method LineItemDraft setExternalTaxRate(ExternalTaxRateDraft $externalTaxRate = null)
37
 */
38
class LineItemDraft extends JsonObject
39
{
40
    public function fieldDefinitions()
41
    {
42
        return [
43
            'productId' => [static::TYPE => 'string'],
44
            'variantId' => [static::TYPE => 'int'],
45
            'quantity' => [static::TYPE => 'int'],
46
            'supplyChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'],
47
            'distributionChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'],
48
            'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'],
49
            'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'],
50
        ];
51
    }
52
}
53