Passed
Branch development (0519a2)
by Theodoros
02:02
created

EcondaToLocaleBridge   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getLocale() 0 3 1
A __construct() 0 3 1
A getCurrentLocale() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Econda\Dependency\Facade;
9
10
class EcondaToLocaleBridge implements EcondaToLocaleInterface
11
{
12
13
    /**
14
     * @var \Spryker\Zed\Locale\Business\LocaleFacadeInterface
0 ignored issues
show
Bug introduced by
The type Spryker\Zed\Locale\Business\LocaleFacadeInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
     */
16
    protected $localeFacade;
17
18
    /**
19
     * @param \Spryker\Zed\Locale\Business\LocaleFacadeInterface $localeFacade
20
     */
21
    public function __construct($localeFacade)
22
    {
23
        $this->localeFacade = $localeFacade;
24
    }
25
26
    /**
27
     * @return \Generated\Shared\Transfer\LocaleTransfer
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\LocaleTransfer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
28
     */
29
    public function getCurrentLocale()
30
    {
31
        return $this->localeFacade->getCurrentLocale();
32
    }
33
34
    /**
35
     * @param string $localeName
36
     *
37
     * @return \Generated\Shared\Transfer\LocaleTransfer
38
     */
39
    public function getLocale($localeName)
40
    {
41
        return $this->localeFacade->getLocale($localeName);
42
    }
43
44
}
45