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
rs 10
c 0
b 0
f 0
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\CustomerFullNameWidget;
11
12
use Spryker\Yves\Kernel\AbstractBundleDependencyProvider;
13
use Spryker\Yves\Kernel\Container;
14
15
class CustomerFullNameWidgetDependencyProvider extends AbstractBundleDependencyProvider
16
{
17
    public const CLIENT_CUSTOMER = 'CLIENT_CUSTOMER';
18
19
    public function provideDependencies(Container $container): Container
20
    {
21
        $container = parent::provideDependencies($container);
22
        $container = $this->addCustomerClient($container);
23
24
        return $container;
25
    }
26
27
    protected function addCustomerClient(Container $container): Container
28
    {
29
        $container->set(static::CLIENT_CUSTOMER, function (Container $container) {
30
            return $container->getLocator()->customer()->client();
31
        });
32
33
        return $container;
34
    }
35
}
36