Completed
Push — develop ( dfae98...8b2ab3 )
by
unknown
17:22 queued 05:52
created

CustomLineItemDraft::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 11
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 11
loc 11
ccs 0
cts 11
cp 0
rs 9.4286
cc 1
eloc 8
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * @author @ct-jensschulze <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\Cart;
7
8
use Commercetools\Core\Model\Common\JsonObject;
9
use Commercetools\Core\Model\Common\LocalizedString;
10
use Commercetools\Core\Model\Common\Money;
11
use Commercetools\Core\Model\Order\ItemState;
12
use Commercetools\Core\Model\TaxCategory\TaxCategoryReference;
13
use Commercetools\Core\Model\TaxCategory\TaxRate;
14
use Commercetools\Core\Model\CustomField\CustomFieldObject;
15
16
/**
17
 * @package Commercetools\Core\Model\Cart
18
 * @apidoc http://dev.sphere.io/http-api-projects-carts.html#custom-line-item
19
 * @method LocalizedString getName()
20
 * @method CustomLineItemDraft setName(LocalizedString $name = null)
21
 * @method Money getMoney()
22
 * @method CustomLineItemDraft setMoney(Money $money = null)
23
 * @method LocalizedString getSlug()
24
 * @method CustomLineItemDraft setSlug(LocalizedString $slug = null)
25
 * @method int getQuantity()
26
 * @method CustomLineItemDraft setQuantity(int $quantity = null)
27
 * @method TaxCategoryReference getTaxCategory()
28
 * @method CustomLineItemDraft setTaxCategory(TaxCategoryReference $taxCategory = null)
29
 * @method CustomFieldObject getCustom()
30
 * @method CustomLineItemDraft setCustom(CustomFieldObject $custom = null)
31
 */
32 View Code Duplication
class CustomLineItemDraft extends JsonObject
0 ignored issues
show
Duplication introduced by
This class 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...
33
{
34
    public function fieldDefinitions()
35
    {
36
        return [
37
            'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
38
            'money' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'],
39
            'slug' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
40
            'quantity' => [static::TYPE => 'int'],
41
            'taxCategory' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\TaxCategoryReference'],
42
            'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'],
43
        ];
44
    }
45
}
46