Test Failed
Pull Request — master (#127)
by Jordan
06:46
created

CalculationModeProvider::getCurrentMode()   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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Samsara\Fermat\Provider;
4
5
use Samsara\Fermat\Enums\CalcMode;
6
7
/**
8
 *
9
 */
10
class CalculationModeProvider
11
{
12
13
    public const PHP_INT_MAX_HALF = PHP_INT_MAX/2;
14
15
    private static CalcMode $currentMode = CalcMode::Auto;
16
17
    /**
18
     * @return CalcMode
19
     */
20
    public static function getCurrentMode(): CalcMode
21
    {
22
        return self::$currentMode;
23
    }
24
25
    /**
26
     * @param CalcMode $currentMode
27
     */
28
    public static function setCurrentMode(CalcMode $currentMode): void
29
    {
30
        self::$currentMode = $currentMode;
31
    }
32
33
}