Passed
Push — feature/eco-3656/eco-3658-enab... ( 202423...b8179e )
by
unknown
06:13
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 createComputopQuoteDefaultShipmentExpander() 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 Spryker\Client\ZedRequest\ZedRequestClientInterface;
12
use SprykerEco\Client\Computop\Dependency\Client\ComputopToShipmentClientInterface;
0 ignored issues
show
Bug introduced by
The type SprykerEco\Client\Comput...ShipmentClientInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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\ComputopQuoteDefaultShipmentExpanderInterface
42
     */
43
    public function createComputopQuoteDefaultShipmentExpander(): ComputopQuoteDefaultShipmentExpanderInterface
44
    {
45
        return new ComputopQuoteDefaultShipmentExpander($this->getContainer()->getLocator()->computop()->client());
46
    }
47
}
48