CustomerFullNameWidgetDependencyProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A provideDependencies() 0 6 1
A addCustomerClient() 0 7 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