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

PayoneToCustomerBridge::getCustomer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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