ModeDetector::getMode()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 7
rs 10
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\Client\Payone\ClientApi\Mode;
9
10
use Spryker\Shared\Config\Environment;
11
use SprykerEco\Shared\Payone\Dependency\ModeDetectorInterface;
12
13
/**
14
 * @deprecated Use Zed one instead
15
 */
16
class ModeDetector implements ModeDetectorInterface
17
{
18
    /**
19
     * @deprecated Will be removed. Needs refactoring to use Zed getMode().
20
     *
21
     * @return string
22
     */
23
    public function getMode(): string
24
    {
25
        if (Environment::isNotProduction()) {
26
            return self::MODE_TEST;
27
        }
28
29
        return self::MODE_LIVE;
30
    }
31
}
32