Code Duplication    Length = 40-40 lines in 2 locations

src/Configuration/TaxRateCreate.php 1 location

@@ 16-55 (lines=40) @@
13
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
14
use Symfony\Component\Config\Definition\ConfigurationInterface;
15
16
class TaxRateCreate implements ConfigurationInterface
17
{
18
    public function getConfigTreeBuilder()
19
    {
20
        $treeBuilder = new TreeBuilder('shapin_stripe');
21
        $rootNode = $treeBuilder->getRootNode();
22
23
        $rootNode
24
            ->children()
25
                ->scalarNode('display_name')
26
                    ->isRequired()
27
                    ->info('The display name of the tax rate, which will be shown to users.')
28
                ->end()
29
                ->booleanNode('inclusive')
30
                    ->isRequired()
31
                    ->info('This specifies if the tax rate is inclusive or exclusive.')
32
                ->end()
33
                ->floatNode('percentage')
34
                    ->isRequired()
35
                    ->info('This represents the tax rate percent out of 100.')
36
                ->end()
37
                ->booleanNode('active')
38
                    ->info('Flag determining whether the tax rate is active or inactive. Inactive tax rates continue to work where they are currently applied however they cannot be used for new applications.')
39
                ->end()
40
                ->scalarNode('description')
41
                    ->info('An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.')
42
                ->end()
43
                ->scalarNode('jurisdiction')
44
                    ->info('The jurisdiction for the tax rate.')
45
                ->end()
46
                ->arrayNode('metadata')
47
                    ->scalarPrototype()->end()
48
                    ->info('Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.')
49
                ->end()
50
            ->end()
51
        ;
52
53
        return $treeBuilder;
54
    }
55
}
56

src/Configuration/TransferCreate.php 1 location

@@ 15-54 (lines=40) @@
12
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
13
use Symfony\Component\Config\Definition\ConfigurationInterface;
14
15
class TransferCreate implements ConfigurationInterface
16
{
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder('shapin_stripe');
20
        $rootNode = $treeBuilder->getRootNode();
21
22
        $rootNode
23
            ->children()
24
                ->integerNode('amount')
25
                    ->isRequired()
26
                    ->info('A positive integer in cents representing how much to transfer.')
27
                ->end()
28
                ->scalarNode('currency')
29
                    ->isRequired()
30
                    ->info('3-letter ISO code for currency.')
31
                ->end()
32
                ->scalarNode('destination')
33
                    ->isRequired()
34
                    ->info('The ID of a connected Stripe account. See the Connect documentation for details.')
35
                ->end()
36
                ->scalarNode('description')
37
                    ->info('An arbitrary string attached to the object. Often useful for displaying to users. This will be unset if you POST an empty value.')
38
                ->end()
39
                ->arrayNode('metadata')
40
                    ->scalarPrototype()->end()
41
                    ->info('Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.')
42
                ->end()
43
                ->scalarNode('source_transaction')
44
                    ->info('You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. See the Connect documentation for details.')
45
                ->end()
46
                ->scalarNode('transfer_group')
47
                    ->info('A string that identifies this transaction as part of a group. See the Connect documentation for details.')
48
                ->end()
49
            ->end()
50
        ;
51
52
        return $treeBuilder;
53
    }
54
}
55