Code Duplication    Length = 3-3 lines in 2 locations

src/Configuration/SubscriptionUpdate.php 1 location

@@ 144-146 (lines=3) @@
141
142
        $rootNode
143
            ->validate()
144
                ->ifTrue(function ($v) {
145
                    return isset($v['billing']) && Subscription::BILLING_SEND_INVOICE !== $v['billing'] && isset($v['days_until_due']);
146
                })
147
                ->thenInvalid('You can only set "days_until_due" for "send_invoice" billing type.')
148
            ->end()
149
        ;

src/Configuration/SubscriptionCreate.php 1 location

@@ 117-119 (lines=3) @@
114
115
        $rootNode
116
            ->validate()
117
                ->ifTrue(function ($v) {
118
                    return isset($v['billing']) && Subscription::BILLING_SEND_INVOICE !== $v['billing'] && isset($v['days_until_due']);
119
                })
120
                ->thenInvalid('You can only set "days_until_due" for "send_invoice" billing type.')
121
            ->end()
122
            ->validate()