Passed
Pull Request — master (#84)
by Olha
12:53
created

StoreReader::getDefaultStoreCountry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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(PayoneToStoreFacadeInterface $storeFacade)
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