Passed
Push — master ( 823aee...b9b37f )
by Alec
13:15 queued 12s
created

NormalizerMode::getDivisor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php
2
// 19.03.23
3
namespace AlecRabbit\Spinner\Contract;
4
5
enum NormalizerMode
6
{
7
    case SMOOTH;
8
    case BALANCED;
9
    case PERFORMANCE;
10
    case SLOW;
11
    case STILL;
12
13
    public function getDivisor(): int
14
    {
15
        return match ($this) {
16
            self::SMOOTH => 20,
17
            self::BALANCED => 50,
18
            self::PERFORMANCE => 100,
19
            self::SLOW => 1000,
20
            self::STILL => 900000,
21
        };
22
    }
23
}