Code Duplication    Length = 21-21 lines in 2 locations

src/Core/Model/Common/ScopedPrice.php 1 location

@@ 51-71 (lines=21) @@
48
    const DISCOUNTED = 'discounted';
49
    const CUSTOM = 'custom';
50
51
    public function fieldDefinitions()
52
    {
53
        return [
54
            static::ID => [static::TYPE => 'string'],
55
            static::VALUE => [self::TYPE => Money::class],
56
            static::CURRENT_VALUE => [static::TYPE => Money::class],
57
            static::COUNTRY => [self::TYPE => 'string'],
58
            static::CUSTOMER_GROUP => [self::TYPE => CustomerGroupReference::class],
59
            static::CHANNEL => [self::TYPE => ChannelReference::class],
60
            static::VALID_FROM => [
61
                self::TYPE => DateTime::class,
62
                self::DECORATOR => DateTimeDecorator::class
63
            ],
64
            static::VALID_UNTIL => [
65
                self::TYPE => DateTime::class,
66
                self::DECORATOR => DateTimeDecorator::class
67
            ],
68
            static::DISCOUNTED => [self::TYPE => DiscountedPrice::class],
69
            static::CUSTOM => [static::TYPE => CustomFieldObject::class],
70
        ];
71
    }
72
73
    /**
74
     * @param Money $money

src/Core/Model/Common/Price.php 1 location

@@ 51-71 (lines=21) @@
48
    const CUSTOM = 'custom';
49
    const TIERS = 'tiers';
50
51
    public function fieldDefinitions()
52
    {
53
        return [
54
            static::ID => [static::TYPE => 'string'],
55
            static::VALUE => [self::TYPE => Money::class],
56
            static::COUNTRY => [self::TYPE => 'string'],
57
            static::CUSTOMER_GROUP => [self::TYPE => CustomerGroupReference::class],
58
            static::CHANNEL => [self::TYPE => ChannelReference::class],
59
            static::VALID_FROM => [
60
                self::TYPE => DateTime::class,
61
                self::DECORATOR => DateTimeDecorator::class
62
            ],
63
            static::VALID_UNTIL => [
64
                self::TYPE => DateTime::class,
65
                self::DECORATOR => DateTimeDecorator::class
66
            ],
67
            static::DISCOUNTED => [self::TYPE => DiscountedPrice::class],
68
            static::CUSTOM => [static::TYPE => CustomFieldObject::class],
69
            static::TIERS => [static::TYPE => PriceTierCollection::class]
70
        ];
71
    }
72
73
    /**
74
     * @param Money $money