Completed
Push — master ( b1e459...fd7739 )
by Alexandr
01:14 queued 13s
created

SessionCustomerValidationPageDependencyProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 6
c 0
b 0
f 0
dl 0
loc 26
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCustomerSessionSaverPlugin() 0 3 1
A getCustomerSessionValidatorPlugin() 0 3 1
A getCustomerSessionValidatorPlugins() 0 5 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\SessionCustomerValidationPage;
11
12
use Spryker\Client\Customer\Plugin\SessionCustomerValidationPage\StorageInvalidationRecordCustomerSessionValidatorPlugin;
13
use Spryker\Yves\SessionRedis\Plugin\SessionCustomerValidationPage\RedisCustomerSessionSaverPlugin;
14
use Spryker\Yves\SessionRedis\Plugin\SessionCustomerValidationPage\RedisCustomerSessionValidatorPlugin;
15
use SprykerShop\Yves\SessionCustomerValidationPage\SessionCustomerValidationPageDependencyProvider as SprykerSessionCustomerValidationPageDependencyProvider;
16
use SprykerShop\Yves\SessionCustomerValidationPageExtension\Dependency\Plugin\CustomerSessionSaverPluginInterface;
17
use SprykerShop\Yves\SessionCustomerValidationPageExtension\Dependency\Plugin\CustomerSessionValidatorPluginInterface;
18
19
/**
20
 * @method \SprykerShop\Yves\SessionCustomerValidationPage\SessionCustomerValidationPageConfig getConfig()
21
 */
22
class SessionCustomerValidationPageDependencyProvider extends SprykerSessionCustomerValidationPageDependencyProvider
23
{
24
    /**
25
     * @return \SprykerShop\Yves\SessionCustomerValidationPageExtension\Dependency\Plugin\CustomerSessionSaverPluginInterface
26
     */
27
    protected function getCustomerSessionSaverPlugin(): CustomerSessionSaverPluginInterface
28
    {
29
        return new RedisCustomerSessionSaverPlugin();
30
    }
31
32
    /**
33
     * @return \SprykerShop\Yves\SessionCustomerValidationPageExtension\Dependency\Plugin\CustomerSessionValidatorPluginInterface
34
     */
35
    protected function getCustomerSessionValidatorPlugin(): CustomerSessionValidatorPluginInterface
36
    {
37
        return new RedisCustomerSessionValidatorPlugin();
38
    }
39
40
    /**
41
     * @return array<\SprykerShop\Yves\SessionCustomerValidationPageExtension\Dependency\Plugin\CustomerSessionValidatorPluginInterface>
42
     */
43
    protected function getCustomerSessionValidatorPlugins(): array
44
    {
45
        return [
46
            new RedisCustomerSessionValidatorPlugin(),
47
            new StorageInvalidationRecordCustomerSessionValidatorPlugin(),
48
        ];
49
    }
50
}
51