SubscriptionCancel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 18 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license. See the LICENSE file for details.
8
 */
9
10
namespace Shapin\Stripe\Configuration;
11
12
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
13
use Symfony\Component\Config\Definition\ConfigurationInterface;
14
15
class SubscriptionCancel implements ConfigurationInterface
16
{
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder('shapin_stripe_subscription_cancel');
20
        $rootNode = $treeBuilder->getRootNode();
21
22
        $rootNode
23
            ->children()
24
                ->booleanNode('invoice_now')
25
                    ->info('Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.')
26
                ->end()
27
                ->booleanNode('prorate')
28
                    ->info('Will generate a proration invoice item that credits remaining unused time until the subscription period end.')
29
                ->end()
30
            ->end()
31
        ;
32
33
        return $treeBuilder;
34
    }
35
}
36