Passed
Push — master ( ee3474...0cff61 )
by Francis
04:46 queued 01:48
created

StripeCheckoutSessionApi::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 4
dl 0
loc 8
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FluxSE\PayumStripe\Api;
6
7
final class StripeCheckoutSessionApi implements StripeCheckoutSessionApiInterface
8
{
9
    use KeysAwareTrait {
10
        KeysAwareTrait::__construct as private __keysAwareTraitConstruct;
11
    }
12
13
    use PaymentMethodTypesAwareTrait {
14
        PaymentMethodTypesAwareTrait::__construct as private __paymentMethodTypesAwareTraitConstruct;
15
    }
16
17
    /**
18
     * @param string[] $webhookSecretKeys
19
     */
20
    public function __construct(
21
        string $publishable,
22
        string $secret,
23
        array $webhookSecretKeys = [],
24
        array $paymentMethodTypes = self::DEFAULT_PAYMENT_METHOD_TYPES
25
    ) {
26
        $this->__keysAwareTraitConstruct($publishable, $secret, $webhookSecretKeys);
27
        $this->__paymentMethodTypesAwareTraitConstruct($paymentMethodTypes);
28
    }
29
}
30