Completed
Pull Request — dev (#9)
by Andrey
09:24 queued 05:50
created

AmazonPayFactory   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 48
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getShipmentClient() 0 3 1
A getQuoteClient() 0 3 1
A getCheckoutClient() 0 3 1
A createAmazonPayConfig() 0 3 1
A getCalculationClient() 0 3 1
A getCustomerClient() 0 3 1
1
<?php
2
3
/**
4
 * Apache OSL-2
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Yves\AmazonPay;
9
10
use Spryker\Yves\Kernel\AbstractFactory;
11
use SprykerEco\Shared\AmazonPay\AmazonPayConfig;
12
13
class AmazonPayFactory extends AbstractFactory
14
{
15
    /**
16
     * @return \SprykerEco\Yves\AmazonPay\Dependency\Client\AmazonPayToQuoteInterface
17
     */
18
    public function getQuoteClient()
19
    {
20
        return $this->getProvidedDependency(AmazonPayDependencyProvider::CLIENT_QUOTE);
21
    }
22
23
    /**
24
     * @return \SprykerEco\Yves\AmazonPay\Dependency\Client\AmazonPayToCheckoutInterface
25
     */
26
    public function getCheckoutClient()
27
    {
28
        return $this->getProvidedDependency(AmazonPayDependencyProvider::CLIENT_CHECKOUT);
29
    }
30
31
    /**
32
     * @return \SprykerEco\Shared\AmazonPay\AmazonPayConfigInterface
33
     */
34
    public function createAmazonPayConfig()
35
    {
36
        return new AmazonPayConfig();
37
    }
38
39
    /**
40
     * @return \SprykerEco\Yves\AmazonPay\Dependency\Client\AmazonPayToShipmentInterface
41
     */
42
    public function getShipmentClient()
43
    {
44
        return $this->getProvidedDependency(AmazonPayDependencyProvider::CLIENT_SHIPMENT);
45
    }
46
47
    /**
48
     * @return \SprykerEco\Yves\AmazonPay\Dependency\Client\AmazonPayToCalculationInterface
49
     */
50
    public function getCalculationClient()
51
    {
52
        return $this->getProvidedDependency(AmazonPayDependencyProvider::CLIENT_CALCULATION);
53
    }
54
55
    /**
56
     * @return \SprykerEco\Yves\AmazonPay\Dependency\Client\AmazonPayToCustomerInterface
57
     */
58
    public function getCustomerClient()
59
    {
60
        return $this->getProvidedDependency(AmazonPayDependencyProvider::CLIENT_CUSTOMER);
61
    }
62
}
63