provideDependencies()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types = 1);
9
10
namespace Pyz\Yves\ProductReviewWidget;
11
12
use Spryker\Yves\Kernel\Container;
13
use SprykerShop\Yves\ProductReviewWidget\ProductReviewWidgetDependencyProvider as SprykerProductReviewWidgetDependencyProvider;
14
15
class ProductReviewWidgetDependencyProvider extends SprykerProductReviewWidgetDependencyProvider
16
{
17
    /**
18
     * @var string
19
     */
20
    public const CLIENT_GLOSSARY_STORAGE = 'CLIENT_GLOSSARY_STORAGE';
21
22
    /**
23
     * @param \Spryker\Yves\Kernel\Container $container
24
     *
25
     * @return \Spryker\Yves\Kernel\Container
26
     */
27
    public function provideDependencies(Container $container): Container
28
    {
29
        $container = parent::provideDependencies($container);
30
        $this->addGlossaryStorageClient($container);
31
32
        return $container;
33
    }
34
35
    /**
36
     * @param \Spryker\Yves\Kernel\Container $container
37
     *
38
     * @return \Spryker\Yves\Kernel\Container
39
     */
40
    protected function addGlossaryStorageClient(Container $container): Container
41
    {
42
        $container->set(static::CLIENT_GLOSSARY_STORAGE, function (Container $container) {
43
            return $container->getLocator()->glossaryStorage()->client();
44
        });
45
46
        return $container;
47
    }
48
}
49