Passed
Pull Request — master (#44)
by Cesar
12:37
created

BraintreeService   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 71
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getWebhookService() 0 3 1
A getCustomerService() 0 3 1
A getPaymentService() 0 3 1
A getForwardApiService() 0 3 1
A __construct() 0 10 1
1
<?php
2
3
namespace App\Service;
4
5
use App\Service\Braintree\CustomerService;
6
use App\Service\Braintree\ForwardApiService;
7
use App\Service\Braintree\PaymentService;
8
use App\Service\Braintree\WebhookService;
9
10
/**
11
 * Class BraintreeService
12
 * @package App\Service
13
 */
14
class BraintreeService
15
{
16
    /**
17
     * @var PaymentService
18
     */
19
    protected PaymentService $paymentService;
20
21
    /**
22
     * @var CustomerService
23
     */
24
    protected CustomerService $customerService;
25
26
    /**
27
     * @var WebhookService
28
     */
29
    protected WebhookService $webhookService;
30
31
    /**
32
     * @var ForwardApiService
33
     */
34
    protected ForwardApiService $forwardApiService;
35
36
    /**
37
     * PaypalService constructor.
38
     * @param PaymentService $paymentService
39
     * @param CustomerService $customerService
40
     * @param WebhookService $webhookService
41
     * @param ForwardApiService $forwardApiService
42
     */
43
    public function __construct(
44
        PaymentService $paymentService,
45
        CustomerService $customerService,
46
        WebhookService $webhookService,
47
        ForwardApiService $forwardApiService
48
    ) {
49
        $this->paymentService = $paymentService;
50
        $this->customerService = $customerService;
51
        $this->webhookService = $webhookService;
52
        $this->forwardApiService = $forwardApiService;
53
    }
54
55
    /**
56
     * @return PaymentService
57
     */
58
    public function getPaymentService(): PaymentService
59
    {
60
        return $this->paymentService;
61
    }
62
63
    /**
64
     * @return CustomerService
65
     */
66
    public function getCustomerService(): CustomerService
67
    {
68
        return $this->customerService;
69
    }
70
71
    /**
72
     * @return WebhookService
73
     */
74
    public function getWebhookService(): WebhookService
75
    {
76
        return $this->webhookService;
77
    }
78
79
    /**
80
     * @return ForwardApiService
81
     */
82
    public function getForwardApiService(): ForwardApiService
83
    {
84
        return $this->forwardApiService;
85
    }
86
}
87