Passed
Push — feature/eco-3656/eco-3658-enab... ( da021b...202423 )
by
unknown
04:29
created

createComputopQuoteDefaultShipmentExpander()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
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\Client\Computop;
9
10
use Spryker\Client\Kernel\AbstractFactory;
11
use Spryker\Client\ZedRequest\ZedRequestClientInterface;
12
use SprykerEco\Client\Computop\Dependency\Client\ComputopToShipmentClientInterface;
13
use SprykerEco\Client\Computop\Zed\ComputopStub;
14
use SprykerEco\Client\Computop\Zed\ComputopStubInterface;
15
16
/**
17
 * @method \SprykerEco\Client\Computop\ComputopConfig getConfig()
18
 */
19
class ComputopFactory extends AbstractFactory
20
{
21
    /**
22
     * @return \SprykerEco\Client\Computop\Zed\ComputopStubInterface
23
     */
24
    public function createZedStub(): ComputopStubInterface
25
    {
26
        return new ComputopStub(
27
            $this->getZedRequestClient(),
28
            $this->getConfig()
29
        );
30
    }
31
32
    /**
33
     * @return \Spryker\Client\ZedRequest\ZedRequestClientInterface
34
     */
35
    public function getZedRequestClient(): ZedRequestClientInterface
36
    {
37
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_ZED_REQUEST);
38
    }
39
40
    /**
41
     * @return \SprykerEco\Client\Computop\Dependency\Client\ComputopToShipmentClientInterface
42
     */
43
    public function getShipmentClient(): ComputopToShipmentClientInterface
44
    {
45
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_SHIPMENT);
46
    }
47
48
    /**
49
     * @return \SprykerEco\Client\Computop\ComputopQuoteDefaultShipmentExpanderInterface
50
     */
51
    public function createComputopQuoteDefaultShipmentExpander(): ComputopQuoteDefaultShipmentExpanderInterface
52
    {
53
        return new ComputopQuoteDefaultShipmentExpander($this->getContainer()->getLocator()->computop()->client());
54
    }
55
}
56