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

PayoneCommunicationFactory   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 42
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getOmsFacade() 0 4 1
A getSalesFacade() 0 4 1
A getRefundFacade() 0 4 1
A getCalculationFacade() 0 4 1
A createUrlHmacGenerator() 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\Zed\Payone\Communication;
9
10
use Spryker\Zed\Kernel\Communication\AbstractCommunicationFactory;
11
use SprykerEco\Zed\Payone\Business\Key\UrlHmacGenerator;
12
use SprykerEco\Zed\Payone\PayoneDependencyProvider;
13
14
/**
15
 * @method \SprykerEco\Zed\Payone\PayoneConfig getConfig()
16
 * @method \SprykerEco\Zed\Payone\Persistence\PayoneQueryContainerInterface getQueryContainer()
17
 */
18
class PayoneCommunicationFactory extends AbstractCommunicationFactory
19
{
20
    /**
21
     * @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToOmsInterface
22
     */
23
    public function getOmsFacade()
24
    {
25
        return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_OMS);
26
    }
27
28
    /**
29
     * @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToSalesInterface
30
     */
31
    public function getSalesFacade()
32
    {
33
        return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_SALES);
34
    }
35
36
    /**
37
     * @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToRefundInterface
38
     */
39
    public function getRefundFacade()
40
    {
41
        return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_REFUND);
42
    }
43
44
    /**
45
     * @return \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToCalculationInterface
46
     */
47
    public function getCalculationFacade()
48
    {
49
        return $this->getProvidedDependency(PayoneDependencyProvider::FACADE_CALCULATION);
50
    }
51
52
    /**
53
     * @return \SprykerEco\Zed\Payone\Business\Key\HmacGeneratorInterface
54
     */
55
    public function createUrlHmacGenerator()
56
    {
57
        return new UrlHmacGenerator();
58
    }
59
}
60