PayoneToCustomerBridge   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 39
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCustomer() 0 3 1
A isLoggedIn() 0 3 1
A __construct() 0 3 1
A getCustomerByEmail() 0 3 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;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\CustomerTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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