Passed
Pull Request — master (#84)
by Yaroslav
05:15
created

StoreReader   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getDefaultStoreCountry() 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\Payone\Business\Model;
9
10
use SprykerEco\Zed\Payone\Dependency\Facade\PayoneToStoreFacadeInterface;
11
12
class StoreReader implements StoreReaderInterface
13
{
14
    /**
15
     * @var \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToStoreFacadeInterface
16
     */
17
    protected PayoneToStoreFacadeInterface $storeFacade;
18
19
    /**
20
     * @param \SprykerEco\Zed\Payone\Dependency\Facade\PayoneToStoreFacadeInterface $storeClient
21
     */
22
    public function __construct(PayoneToStoreClientInterface $storeFacade)
0 ignored issues
show
Bug introduced by
The type SprykerEco\Zed\Payone\Bu...eToStoreClientInterface 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...
23
    {
24
        $this->storeFacade = $storeFacade;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getDefaultStoreCountry(): string
31
    {
32
        return current($this->storeFacade->getCurrentStore()->getCountries());
33
    }
34
}
35