Code Duplication    Length = 12-17 lines in 10 locations

src/Model/Message/ParcelAddedToDeliveryMessage.php 1 location

@@ 33-45 (lines=13) @@
30
 * @method Parcel getParcel()
31
 * @method ParcelAddedToDeliveryMessage setParcel(Parcel $parcel = null)
32
 */
33
class ParcelAddedToDeliveryMessage extends Message
34
{
35
    const MESSAGE_TYPE = 'ParcelAddedToDelivery';
36
37
    public function fieldDefinitions()
38
    {
39
        $definitions = parent::fieldDefinitions();
40
        $definitions['delivery'] = [static::TYPE => '\Commercetools\Core\Model\Order\Delivery'];
41
        $definitions['parcel'] = [static::TYPE => '\Commercetools\Core\Model\Order\Parcel'];
42
43
        return $definitions;
44
    }
45
}
46

src/Model/ProductType/EnumType.php 1 location

@@ 17-33 (lines=17) @@
14
 * @method EnumCollection getValues()
15
 * @method EnumType setValues(EnumCollection $values = null)
16
 */
17
class EnumType extends AttributeType
18
{
19
    const NAME = 'enum';
20
21
    public function fieldDefinitions()
22
    {
23
        $definitions = parent::fieldDefinitions();
24
        $definitions['values'] = [static::TYPE => '\Commercetools\Core\Model\Common\EnumCollection'];
25
26
        return $definitions;
27
    }
28
29
    public function fieldTypeDefinition()
30
    {
31
        return [static::TYPE => '\Commercetools\Core\Model\Common\Enum'];
32
    }
33
}
34

src/Model/ProductType/LocalizedEnumType.php 1 location

@@ 17-33 (lines=17) @@
14
 * @method LocalizedEnumCollection getValues()
15
 * @method LocalizedEnumType setValues(LocalizedEnumCollection $values = null)
16
 */
17
class LocalizedEnumType extends AttributeType
18
{
19
    const NAME = 'lenum';
20
21
    public function fieldDefinitions()
22
    {
23
        $definitions = parent::fieldDefinitions();
24
        $definitions['values'] = [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedEnumCollection'];
25
26
        return $definitions;
27
    }
28
29
    public function fieldTypeDefinition()
30
    {
31
        return [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedEnum'];
32
    }
33
}
34

src/Model/ProductType/ReferenceType.php 1 location

@@ 15-31 (lines=17) @@
12
 * @method string getReferenceTypeId()
13
 * @method ReferenceType setReferenceTypeId(string $referenceTypeId = null)
14
 */
15
class ReferenceType extends AttributeType
16
{
17
    const NAME = 'reference';
18
19
    public function fieldDefinitions()
20
    {
21
        $definitions = parent::fieldDefinitions();
22
        $definitions['referenceTypeId'] = [static::TYPE => 'string'];
23
24
        return $definitions;
25
    }
26
27
    public function fieldTypeDefinition()
28
    {
29
        return [static::TYPE => '\Commercetools\Core\Model\Common\Reference'];
30
    }
31
}
32

src/Model/Type/EnumType.php 1 location

@@ 17-33 (lines=17) @@
14
 * @method EnumCollection getValues()
15
 * @method EnumType setValues(EnumCollection $values = null)
16
 */
17
class EnumType extends FieldType
18
{
19
    const NAME = 'Enum';
20
21
    public function fieldDefinitions()
22
    {
23
        $definitions = parent::fieldDefinitions();
24
        $definitions['values'] = [static::TYPE => '\Commercetools\Core\Model\Common\EnumCollection'];
25
26
        return $definitions;
27
    }
28
29
    public function fieldTypeDefinition()
30
    {
31
        return [static::TYPE => '\Commercetools\Core\Model\Common\Enum'];
32
    }
33
}
34

src/Model/Type/LocalizedEnumType.php 1 location

@@ 17-33 (lines=17) @@
14
 * @method LocalizedEnumCollection getValues()
15
 * @method LocalizedEnumType setValues(LocalizedEnumCollection $values = null)
16
 */
17
class LocalizedEnumType extends FieldType
18
{
19
    const NAME = 'LocalizedEnum';
20
21
    public function fieldDefinitions()
22
    {
23
        $definitions = parent::fieldDefinitions();
24
        $definitions['values'] = [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedEnumCollection'];
25
26
        return $definitions;
27
    }
28
29
    public function fieldTypeDefinition()
30
    {
31
        return [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedEnum'];
32
    }
33
}
34

src/Model/Type/ReferenceType.php 1 location

@@ 15-31 (lines=17) @@
12
 * @method string getReferenceTypeId()
13
 * @method ReferenceType setReferenceTypeId(string $referenceTypeId = null)
14
 */
15
class ReferenceType extends FieldType
16
{
17
    const NAME = 'Reference';
18
19
    public function fieldDefinitions()
20
    {
21
        $definitions = parent::fieldDefinitions();
22
        $definitions['referenceTypeId'] = [static::TYPE => 'string'];
23
24
        return $definitions;
25
    }
26
27
    public function fieldTypeDefinition()
28
    {
29
        return [static::TYPE => '\Commercetools\Core\Model\Common\Reference'];
30
    }
31
}
32

src/Model/Message/ProductSlugChangedMessage.php 1 location

@@ 31-42 (lines=12) @@
28
 * @method LocalizedString getSlug()
29
 * @method ProductSlugChangedMessage setSlug(LocalizedString $slug = null)
30
 */
31
class ProductSlugChangedMessage extends Message
32
{
33
    const MESSAGE_TYPE = 'ProductSlugChanged';
34
35
    public function fieldDefinitions()
36
    {
37
        $definitions = parent::fieldDefinitions();
38
        $definitions['slug'] = [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'];
39
40
        return $definitions;
41
    }
42
}
43

src/Model/Message/CategorySlugChangedMessage.php 1 location

@@ 31-42 (lines=12) @@
28
 * @method LocalizedString getSlug()
29
 * @method CategorySlugChangedMessage setSlug(LocalizedString $slug = null)
30
 */
31
class CategorySlugChangedMessage extends Message
32
{
33
    const MESSAGE_TYPE = 'CategorySlugChanged';
34
35
    public function fieldDefinitions()
36
    {
37
        $definitions = parent::fieldDefinitions();
38
        $definitions['slug'] = [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'];
39
40
        return $definitions;
41
    }
42
}
43

src/Model/Message/CustomerCreatedMessage.php 1 location

@@ 30-41 (lines=12) @@
27
 * @method Customer getCustomer()
28
 * @method CustomerCreatedMessage setCustomer(Customer $customer = null)
29
 */
30
class CustomerCreatedMessage extends Message
31
{
32
    const MESSAGE_TYPE = 'CustomerCreated';
33
34
    public function fieldDefinitions()
35
    {
36
        $definitions = parent::fieldDefinitions();
37
        $definitions['customer'] = [static::TYPE => '\Commercetools\Core\Model\Customer\Customer'];
38
39
        return $definitions;
40
    }
41
}
42