Passed
Push — feature/eco-3656/eco-3658-enab... ( ee0b63...39446b )
by
unknown
04:19
created

ComputopFactory   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getZedRequestClient() 0 3 1
A createZedStub() 0 5 1
A getShipmentClient() 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\Client\Computop;
9
10
use Spryker\Client\Kernel\AbstractFactory;
11
use SprykerEco\Client\Computop\Zed\ComputopStub;
12
13
/**
14
 * @method \SprykerEco\Client\Computop\ComputopConfig getConfig()
15
 */
16
class ComputopFactory extends AbstractFactory
17
{
18
    /**
19
     * @return \SprykerEco\Client\Computop\Zed\ComputopStubInterface
20
     */
21
    public function createZedStub()
22
    {
23
        return new ComputopStub(
24
            $this->getZedRequestClient(),
25
            $this->getConfig()
26
        );
27
    }
28
29
    /**
30
     * @return \Spryker\Client\ZedRequest\ZedRequestClientInterface
31
     */
32
    protected function getZedRequestClient()
33
    {
34
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_ZED_REQUEST);
35
    }
36
37
    /**
38
     * @return \Spryker\Client\Shipment\ShipmentClientInterface
39
     */
40
    public function getShipmentClient(): \Spryker\Client\Shipment\ShipmentClientInterface
41
    {
42
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_SHIPMENT);
43
    }
44
45
}
46