FirstDataDependencyProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 8
c 1
b 0
f 0
dl 0
loc 29
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addUtilTextService() 0 7 1
A provideDependencies() 0 6 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Glue\FirstData;
9
10
use Spryker\Glue\Kernel\AbstractBundleDependencyProvider;
11
use Spryker\Glue\Kernel\Container;
12
use SprykerEco\Glue\FirstData\Dependency\Service\FirstDataToUtilTextServiceBridge;
13
14
class FirstDataDependencyProvider extends AbstractBundleDependencyProvider
15
{
16
    public const SERVICE_UTIL_TEXT = 'SERVICE_UTIL_TEXT';
17
18
    /**
19
     * @param \Spryker\Glue\Kernel\Container $container
20
     *
21
     * @return \Spryker\Glue\Kernel\Container
22
     */
23
    public function provideDependencies(Container $container): Container
24
    {
25
        $container = parent::provideDependencies($container);
26
        $container = $this->addUtilTextService($container);
27
28
        return $container;
29
    }
30
31
    /**
32
     * @param \Spryker\Glue\Kernel\Container $container
33
     *
34
     * @return \Spryker\Glue\Kernel\Container
35
     */
36
    protected function addUtilTextService(Container $container): Container
37
    {
38
        $container->set(static::SERVICE_UTIL_TEXT, function (Container $container) {
39
            return new FirstDataToUtilTextServiceBridge($container->getLocator()->utilText()->service());
40
        });
41
42
        return $container;
43
    }
44
}
45