Passed
Push — master ( d1e743...c9dff9 )
by Anton
18:40 queued 10:26
created

RouterConfig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAllowedLanguages() 0 3 1
A getAllowedStores() 0 3 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
namespace Pyz\Yves\Router;
9
10
use Spryker\Client\Kernel\Container;
11
use Spryker\Yves\Router\RouterConfig as SprykerRouterConfig;
12
13
/**
14
 * @method \Spryker\Shared\Router\RouterConfig getSharedConfig()
15
 */
16
class RouterConfig extends SprykerRouterConfig
17
{
18
    /**
19
     * @see \Spryker\Yves\Router\Plugin\RouterEnhancer\LanguagePrefixRouterEnhancerPlugin
20
     *
21
     * @return array<string>
22
     */
23
    public function getAllowedLanguages(): array
24
    {
25
        return (new Container())->getLocator()->locale()->client()->getAllowedLanguages();
26
    }
27
28
    /**
29
     * @return array<string>
30
     */
31
    public function getAllowedStores(): array
32
    {
33
        return (new Container())->getLocator()->storeStorage()->client()->getStoreNames();
34
    }
35
}
36