ArvatoRssDependencyProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 38
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A provideCommunicationLayerDependencies() 0 9 1
A provideBusinessLayerDependencies() 0 11 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\Zed\ArvatoRss;
9
10
use Spryker\Zed\Kernel\AbstractBundleDependencyProvider;
11
use Spryker\Zed\Kernel\Container;
12
use SprykerEco\Zed\ArvatoRss\Dependency\Facade\ArvatoRssToMoneyBridge;
13
use SprykerEco\Zed\ArvatoRss\Dependency\Facade\ArvatoRssToSalesBridge;
14
use SprykerEco\Zed\ArvatoRss\Dependency\Facade\ArvatoRssToStoreBridge;
15
16
class ArvatoRssDependencyProvider extends AbstractBundleDependencyProvider
17
{
18
    public const FACADE_MONEY = 'FACADE_MONEY';
19
    public const FACADE_STORE = 'FACADE_STORE';
20
    public const FACADE_SALES = 'FACADE_SALES';
21
22
    /**
23
     * @param \Spryker\Zed\Kernel\Container $container
24
     *
25
     * @return \Spryker\Zed\Kernel\Container
26
     */
27
    public function provideBusinessLayerDependencies(Container $container)
28
    {
29
        $container[static::FACADE_MONEY] = function (Container $container) {
30
            return new ArvatoRssToMoneyBridge($container->getLocator()->money()->facade());
31
        };
32
33
        $container[static::FACADE_STORE] = function (Container $container) {
34
            return new ArvatoRssToStoreBridge($container->getLocator()->store()->facade());
35
        };
36
37
        return $container;
38
    }
39
40
    /**
41
     * @param \Spryker\Zed\Kernel\Container $container
42
     *
43
     * @return \Spryker\Zed\Kernel\Container
44
     */
45
    public function provideCommunicationLayerDependencies(Container $container)
46
    {
47
        $container = parent::provideCommunicationLayerDependencies($container);
48
49
        $container[static::FACADE_SALES] = function (Container $container) {
50
            return new ArvatoRssToSalesBridge($container->getLocator()->sales()->facade());
51
        };
52
53
        return $container;
54
    }
55
}
56