Passed
Push — feature/eco-3656/eco-3658-enab... ( 202423...b8179e )
by
unknown
06:13
created

ComputopDependencyProvider::addShipmentClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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\AbstractDependencyProvider;
11
use Spryker\Client\Kernel\Container;
12
13
class ComputopDependencyProvider extends AbstractDependencyProvider
14
{
15
    public const CLIENT_ZED_REQUEST = 'CLIENT_ZED_REQUEST';
16
17
    /**
18
     * @param \Spryker\Client\Kernel\Container $container
19
     *
20
     * @return \Spryker\Client\Kernel\Container
21
     */
22
    public function provideServiceLayerDependencies(Container $container): Container
23
    {
24
        $container = $this->addZedRequestClient($container);
25
26
        return $container;
27
    }
28
29
    /**
30
     * @param \Spryker\Client\Kernel\Container $container
31
     *
32
     * @return \Spryker\Client\Kernel\Container
33
     */
34
    protected function addZedRequestClient(Container $container): Container
35
    {
36
        $container->set(static::CLIENT_ZED_REQUEST, function (Container $container) {
37
            return $container->getLocator()->zedRequest()->client();
38
        });
39
40
        return $container;
41
    }
42
}
43