AfterPayCommunicationFactory::getRefundFacade()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Zed\AfterPay\Communication;
9
10
use Spryker\Zed\Kernel\Communication\AbstractCommunicationFactory;
11
use SprykerEco\Zed\AfterPay\AfterPayDependencyProvider;
12
use SprykerEco\Zed\AfterPay\Communication\Converter\OrderToCallConverter;
13
use SprykerEco\Zed\AfterPay\Communication\Converter\OrderToCallConverterInterface;
14
use SprykerEco\Zed\AfterPay\Communication\Converter\QuoteToCallConverter;
15
use SprykerEco\Zed\AfterPay\Communication\Converter\QuoteToCallConverterInterface;
16
use SprykerEco\Zed\AfterPay\Dependency\Facade\AfterPayToRefundFacadeInterface;
17
use SprykerEco\Zed\AfterPay\Dependency\Facade\AfterPayToSalesFacadeInterface;
18
19
/**
20
 * @method \SprykerEco\Zed\AfterPay\Persistence\AfterPayQueryContainerInterface getQueryContainer()
21
 * @method \SprykerEco\Zed\AfterPay\AfterPayConfig getConfig()
22
 * @method \SprykerEco\Zed\AfterPay\Business\AfterPayFacadeInterface getFacade()
23
 * @method \SprykerEco\Zed\AfterPay\Persistence\AfterPayEntityManagerInterface getEntityManager()
24
 */
25
class AfterPayCommunicationFactory extends AbstractCommunicationFactory
26
{
27
    /**
28
     * @return \SprykerEco\Zed\AfterPay\Dependency\Facade\AfterPayToSalesFacadeInterface
29
     */
30
    public function getSalesFacade(): AfterPayToSalesFacadeInterface
31
    {
32
        return $this->getProvidedDependency(AfterPayDependencyProvider::FACADE_SALES);
33
    }
34
35
    /**
36
     * @return \SprykerEco\Zed\AfterPay\Dependency\Facade\AfterPayToRefundFacadeInterface
37
     */
38
    public function getRefundFacade(): AfterPayToRefundFacadeInterface
39
    {
40
        return $this->getProvidedDependency(AfterPayDependencyProvider::FACADE_REFUND);
41
    }
42
43
    /**
44
     * @return \SprykerEco\Zed\AfterPay\Communication\Converter\QuoteToCallConverterInterface
45
     */
46
    public function createQuoteToCallConverter(): QuoteToCallConverterInterface
47
    {
48
        return new QuoteToCallConverter();
0 ignored issues
show
Deprecated Code introduced by
The class SprykerEco\Zed\AfterPay\...er\QuoteToCallConverter has been deprecated: Use {@link \SprykerEco\Zed\AfterPay\Business\Mapper\AfterPayMapper} instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

48
        return /** @scrutinizer ignore-deprecated */ new QuoteToCallConverter();
Loading history...
49
    }
50
51
    /**
52
     * @return \SprykerEco\Zed\AfterPay\Communication\Converter\OrderToCallConverterInterface
53
     */
54
    public function createOrderToCallConverter(): OrderToCallConverterInterface
55
    {
56
        return new OrderToCallConverter();
57
    }
58
}
59