ModeDetector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMode() 0 7 2
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