Completed
Push — master ( a42644...fb7144 )
by Oleksandr
10s
created

PayoneToCustomerBridge   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 41
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCustomer() 0 4 1
A isLoggedIn() 0 4 1
A getCustomerByEmail() 0 4 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Yves\Payone\Dependency\Client;
9
10
use Generated\Shared\Transfer\CustomerTransfer;
11
12
class PayoneToCustomerBridge implements PayoneToCustomerInterface
13
{
14
    /**
15
     * @var \Spryker\Client\Customer\CustomerClientInterface
16
     */
17
    protected $customerClient;
18
19
    /**
20
     * @param \Spryker\Client\Customer\CustomerClientInterface $customerClient
21
     */
22
    public function __construct($customerClient)
23
    {
24
        $this->customerClient = $customerClient;
25
    }
26
27
    /**
28
     * @return \Generated\Shared\Transfer\CustomerTransfer|null
29
     */
30
    public function getCustomer()
31
    {
32
        return $this->customerClient->getCustomer();
33
    }
34
35
    /**
36
     * @return bool
37
     */
38
    public function isLoggedIn()
39
    {
40
        return $this->customerClient->isLoggedIn();
41
    }
42
43
    /**
44
     * @param \Generated\Shared\Transfer\CustomerTransfer $customerTransfer
45
     *
46
     * @return \Generated\Shared\Transfer\CustomerTransfer
47
     */
48
    public function getCustomerByEmail(CustomerTransfer $customerTransfer)
49
    {
50
        return $this->customerClient->getCustomerByEmail($customerTransfer);
51
    }
52
}
53