Code Duplication    Length = 19-19 lines in 3 locations

src/Model/Message/Message.php 1 location

@@ 51-69 (lines=19) @@
48
        }
49
    }
50
51
    public function fieldDefinitions()
52
    {
53
        return [
54
            'id' => [static::TYPE => 'string'],
55
            'version' => [static::TYPE => 'int'],
56
            'createdAt' => [
57
                static::TYPE => '\DateTime',
58
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
59
            ],
60
            'lastModifiedAt' => [
61
                static::TYPE => '\DateTime',
62
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
63
            ],
64
            'sequenceNumber' => [static::TYPE => 'int'],
65
            'resource' => [static::TYPE => '\Commercetools\Core\Model\Common\Reference'],
66
            'resourceVersion' => [static::TYPE => 'int'],
67
            'type' => [static::TYPE => 'string'],
68
        ];
69
    }
70
71
    /**
72
     * @param array $data

src/Model/Order/ReturnItem.php 1 location

@@ 33-51 (lines=19) @@
30
 */
31
class ReturnItem extends JsonObject
32
{
33
    public function fieldDefinitions()
34
    {
35
        return [
36
            'id' => [static::TYPE => 'string'],
37
            'quantity' => [static::TYPE => 'int'],
38
            'lineItemId' => [static::TYPE => 'string'],
39
            'comment' => [static::TYPE => 'string'],
40
            'shipmentState' => [static::TYPE => 'string'],
41
            'paymentState' => [static::TYPE => 'string'],
42
            'lastModifiedAt' => [
43
                static::TYPE => '\DateTime',
44
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
45
            ],
46
            'createdAt' => [
47
                static::TYPE => '\DateTime',
48
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
49
            ]
50
        ];
51
    }
52
}
53

src/Model/ProductType/ProductType.php 1 location

@@ 37-55 (lines=19) @@
34
    /**
35
     * @return array
36
     */
37
    public function fieldDefinitions()
38
    {
39
        return [
40
            'id' => [static::TYPE => 'string'],
41
            'version' => [static::TYPE => 'int'],
42
            'createdAt' => [
43
                static::TYPE => '\DateTime',
44
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
45
            ],
46
            'lastModifiedAt' => [
47
                static::TYPE => '\DateTime',
48
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
49
            ],
50
            'key' => [static::TYPE => 'string'],
51
            'name' => [static::TYPE => 'string'],
52
            'description' => [static::TYPE => 'string'],
53
            'attributes' => [static::TYPE => '\Commercetools\Core\Model\ProductType\AttributeDefinitionCollection']
54
        ];
55
    }
56
}
57