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

NormalizerMode   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDivisor() 0 8 1
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
}