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\Yves\Payone\Model;
9
10
use SprykerEco\Yves\Payone\Dependency\Client\PayoneToStoreClientInterface;
11
12
class StoreReader implements StoreReaderInterface
13
{
14
    /**
15
     * @var \SprykerEco\Yves\Payone\Dependency\Client\PayoneToStoreClientInterface
16
     */
17
    protected PayoneToStoreClientInterface $storeClient;
18
19
    /**
20
     * @param \SprykerEco\Yves\Payone\Dependency\Client\PayoneToStoreClientInterface $storeClient
21
     */
22
    public function __construct(PayoneToStoreClientInterface $storeClient)
23
    {
24
        $this->storeClient = $storeClient;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getDefaultStoreCountry(): string
31
    {
32
        return current($this->storeClient->getCurrentStore()->getCountries());
33
    }
34
}
35